-
Notifications
You must be signed in to change notification settings - Fork 127
Open
Description
What input code did you provide to the formatter?
Future<void> main() async {
final numberOne = 1;
final numberTwo = 2;
final numberThree = 3;
final numberFour = 4;
final result = numberOne == numberTwo ? numberThree : numberOne == numberFour ? numberOne : numberTwo;
print(result);
}
What output did the formatter produce?
Future<void> main() async {
final numberOne = 1;
final numberTwo = 2;
final numberThree = 3;
final numberFour = 4;
final result = numberOne == numberTwo
? numberThree
: numberOne == numberFour
? numberOne
: numberTwo;
print(result);
}
What output did you expect or want the formatter to produce?
I would expect the branches of every condition to be indented further in.
Future<void> main() async {
final numberOne = 1;
final numberTwo = 2;
final numberThree = 3;
final numberFour = 4;
final result = numberOne == numberTwo
? numberThree
: numberOne == numberFour
? numberOne
: numberTwo;
print(result);
}
Anything else we should know?
This is a dumb example of a scenario that I've got in a real project.
Hopefully it illustrates the point.
Metadata
Metadata
Assignees
Labels
No labels