Dart conditional (ternary) operator using 4 indent instead of 2

187 Views Asked by At

Hello i want to ask is there a way to change indent used in conditional operator in dart? i have code like this

enter image description here

after isDiscount == true dart add 4 indent instead of 2 is there a way to change it so i can manage make dart use 2 indent instead

i used android studio as my editor

here i also have another example for textstyle color that use indent 4

enter image description here

1

There are 1 best solutions below

1
Lucky Trail On

you can do something like this :

condition
? Widget
: condition
? Widget
: condition
? Widget
: Widget