Unverified Commit e45836f2 authored by Alexandre Ardhuin's avatar Alexandre Ardhuin Committed by GitHub

enable lint avoid_field_initializers_in_const_classes (#18415)

parent 58756933
...@@ -57,7 +57,7 @@ linter: ...@@ -57,7 +57,7 @@ linter:
- avoid_classes_with_only_static_members - avoid_classes_with_only_static_members
# - avoid_double_and_int_checks # only useful when targeting JS runtime # - avoid_double_and_int_checks # only useful when targeting JS runtime
- avoid_empty_else - avoid_empty_else
# - avoid_field_initializers_in_const_classes # not yet tested - avoid_field_initializers_in_const_classes
- avoid_function_literals_in_foreach_calls - avoid_function_literals_in_foreach_calls
- avoid_init_to_null - avoid_init_to_null
# - avoid_js_rounded_ints # only useful when targeting JS runtime # - avoid_js_rounded_ints # only useful when targeting JS runtime
......
...@@ -250,14 +250,14 @@ class _PestoLogoState extends State<PestoLogo> { ...@@ -250,14 +250,14 @@ class _PestoLogoState extends State<PestoLogo> {
// A card with the recipe's image, author, and title. // A card with the recipe's image, author, and title.
class RecipeCard extends StatelessWidget { 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); const RecipeCard({ Key key, this.recipe, this.onTap }) : super(key: key);
final Recipe recipe; final Recipe recipe;
final VoidCallback onTap; 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 @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return new GestureDetector( return new GestureDetector(
......
...@@ -176,7 +176,7 @@ abstract class PointerEvent { ...@@ -176,7 +176,7 @@ abstract class PointerEvent {
final double distance; final double distance;
/// The minimum value that a distance can return for this pointer (always 0.0). /// The minimum value that a distance can return for this pointer (always 0.0).
final double distanceMin = 0.0; double get distanceMin => 0.0;
/// The maximum value that a distance can return for this pointer. If this /// The maximum value that a distance can return for this pointer. If this
/// input device cannot detect "hover touch" input events, then this will be /// input device cannot detect "hover touch" input events, then this will be
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment