dart_style
dart_style copied to clipboard
Code with cascading calls inside an assert is moved too soon to a new line.
Actual
class Foo {
final List<Foo> subsections;
final bool aBoolWithSomeVeryLongName;
Foo({
this.subsections,
this.aBoolWithSomeVeryLongName,
}) : assert(subsections
.where((element) => element.aBoolWithSomeVeryLongName)
.length <=
1);
}
Expected (Or something along these lines)
class Foo {
final List<Foo> subsections;
final bool aBoolWithSomeVeryLongName;
Foo({
this.subsections,
this.aBoolWithSomeVeryLongName,
}) : assert(subsections
.where((element) => element.aBoolWithSomeVeryLongName)
.length <= 1);
}