enable lint avoid_field_initializers_in_const_classes (#18415)

This commit is contained in:
Alexandre Ardhuin
2018-06-13 07:20:18 +02:00
committed by GitHub
parent 587569337e
commit e45836f271
3 changed files with 5 additions and 5 deletions

View File

@@ -250,14 +250,14 @@ class _PestoLogoState extends State<PestoLogo> {
// A card with the recipe's image, author, and title.
class RecipeCard extends StatelessWidget {
final TextStyle titleStyle = const PestoStyle(fontSize: 24.0, fontWeight: FontWeight.w600);
final TextStyle authorStyle = const PestoStyle(fontWeight: FontWeight.w500, color: Colors.black54);
const RecipeCard({ Key key, this.recipe, this.onTap }) : super(key: key);
final Recipe recipe;
final VoidCallback onTap;
TextStyle get titleStyle => const PestoStyle(fontSize: 24.0, fontWeight: FontWeight.w600);
TextStyle get authorStyle => const PestoStyle(fontWeight: FontWeight.w500, color: Colors.black54);
@override
Widget build(BuildContext context) {
return new GestureDetector(