>>> class Foo { final List subsections; final bool aBoolWithSomeVeryLongName; Foo({ this.subsections, this.aBoolWithSomeVeryLongName, }) : assert(subsections .where((element) => element.aBoolWithSomeVeryLongName) .length <= 1); } <<< 3.7 class Foo { final List subsections; final bool aBoolWithSomeVeryLongName; Foo({this.subsections, this.aBoolWithSomeVeryLongName}) : assert( subsections .where((element) => element.aBoolWithSomeVeryLongName) .length <= 1, ); }