Enable lint prefer asserts in initializer lists (#12903) * enable lint prefer_asserts_in_initializer_lists * enable --assert-initializer
diff --git a/packages/flutter_tools/lib/src/flutter_manifest.dart b/packages/flutter_tools/lib/src/flutter_manifest.dart index b1bff4b..c909ee6 100644 --- a/packages/flutter_tools/lib/src/flutter_manifest.dart +++ b/packages/flutter_tools/lib/src/flutter_manifest.dart
@@ -102,11 +102,10 @@ } class Font { - Font(this.familyName, this.fontAssets) { - assert(familyName != null); - assert(fontAssets != null); - assert(fontAssets.isNotEmpty); - } + Font(this.familyName, this.fontAssets) + : assert(familyName != null), + assert(fontAssets != null), + assert(fontAssets.isNotEmpty); final String familyName; final List<FontAsset> fontAssets; @@ -123,9 +122,8 @@ } class FontAsset { - FontAsset(this.asset, {this.weight, this.style}) { - assert(asset != null); - } + FontAsset(this.asset, {this.weight, this.style}) + : assert(asset != null); final String asset; final int weight;