diff --git a/packages/golden_toolkit/analysis_options.yaml b/packages/golden_toolkit/analysis_options.yaml index 53d224b..a3be6b8 100644 --- a/packages/golden_toolkit/analysis_options.yaml +++ b/packages/golden_toolkit/analysis_options.yaml @@ -1,121 +1 @@ -# pedantic has a strong foundation, but right now they only enable a small set of lints -# we'll use them as a base, and add on the additional ones that our team has agreed upon. -include: package:pedantic/analysis_options.yaml - -analyzer: - strong-mode: - implicit-dynamic: false - errors: - missing_required_param: warning - missing_return: warning - implementation_imports: warning - todo: ignore - exclude: - -linter: - rules: - # These are specified by effective dart guidelines, but are not yet in pedantic - - avoid_classes_with_only_static_members - # - avoid_catches_without_on_clauses -- pedeantic dart disagrees for valid reasons - # - avoid_function_literals_in_foreach_calls - - avoid_null_checks_in_equality_operators - # - avoid_positional_boolean_parameters -- too many false positives, not enough of an issue - - avoid_private_typedef_functions - - avoid_returning_null - - avoid_returning_this - - avoid_setters_without_getters - - camel_case_types - - constant_identifier_names - - directives_ordering - - file_names - - hash_and_equals - - non_constant_identifier_names - # - omit_local_variable_types - - one_member_abstracts - - package_api_docs - - prefer_adjacent_string_concatenation - - prefer_collection_literals - - prefer_final_fields - - prefer_function_declarations_over_variables - - prefer_generic_function_type_aliases - - prefer_initializing_formals - - prefer_interpolation_to_compose_strings - - public_member_api_docs - - type_annotate_public_apis - - unnecessary_brace_in_string_interps - - unnecessary_getters_setters - - unnecessary_lambdas - - unnecessary_this - # - use_setters_to_change_properties -- too many false positives... pedantic chose to not enforce it as well - - use_to_and_as_if_applicable - - # These are not specified by pedantic dart - - always_declare_return_types - - always_put_control_body_on_new_line - - always_require_non_null_named_parameters - - annotate_overrides - - avoid_field_initializers_in_const_classes - - avoid_renaming_method_parameters - - avoid_returning_null_for_void - - avoid_slow_async_io - - avoid_unused_constructor_parameters - - avoid_void_async - - cancel_subscriptions - - control_flow_in_finally - - empty_statements - - flutter_style_todos - - implementation_imports - - iterable_contains_unrelated_type - - list_remove_unrelated_type - - no_adjacent_strings_in_list - - overridden_fields - - package_names - - package_prefixed_library_names - - prefer_asserts_in_initializer_lists - - prefer_conditional_assignment - - prefer_const_constructors - - prefer_const_constructors_in_immutables - - prefer_const_declarations - - prefer_const_literals_to_create_immutables - - prefer_final_locals - - prefer_foreach - - prefer_single_quotes - - prefer_typing_uninitialized_variables - - prefer_void_to_null - - sort_constructors_first - - sort_pub_dependencies - - sort_unnamed_constructors_first - - test_types_in_equals - - throw_in_finally - - unnecessary_null_aware_assignments - - unnecessary_overrides - - unnecessary_parenthesis - - unnecessary_statements - - #Possible new rules to add - - avoid_returning_null_for_future - - literal_only_boolean_expressions - # - always_put_required_named_parameters_first -- seems like a good idea, but requires adjusting a lot of code - - avoid_bool_literals_in_conditional_expressions - - avoid_catching_errors - # - avoid_types_on_closure_parameters -- is great most of the time, but is necessary often in tests... we should review - # - cascade_invocations -- is great for production code... causes a lot of noise with GWT in tests -- puts multiple thens in a single line - - join_return_with_assignment - - only_throw_errors - - parameter_assignments - - prefer_constructors_over_static_methods - # - prefer_expression_function_bodies -- LINTs on widget build methods... - - prefer_final_in_for_each - - prefer_for_elements_to_map_fromIterable - - prefer_if_elements_to_conditional_expressions - - prefer_if_null_operators - - prefer_inlined_adds - - prefer_null_aware_operators - - prefer_spread_collections - - provide_deprecation_message - - sort_child_properties_last - - unnecessary_await_in_return - - prefer_relative_imports - - avoid_equals_and_hash_code_on_mutable_classes - - avoid_unnecessary_containers - - prefer_is_not_operator +include: package:flutter_lints/flutter.yaml \ No newline at end of file diff --git a/packages/golden_toolkit/example/lib/src/flutter_demo_page.dart b/packages/golden_toolkit/example/lib/src/flutter_demo_page.dart index 8d1eecc..44c2903 100644 --- a/packages/golden_toolkit/example/lib/src/flutter_demo_page.dart +++ b/packages/golden_toolkit/example/lib/src/flutter_demo_page.dart @@ -2,6 +2,8 @@ import 'package:flutter/material.dart'; /// Counter page from flutters default generated app class FlutterDemoPage extends StatelessWidget { + const FlutterDemoPage({Key? key}) : super(key: key); + @override Widget build(BuildContext context) { return MaterialApp( diff --git a/packages/golden_toolkit/example/lib/src/shadow_widget.dart b/packages/golden_toolkit/example/lib/src/shadow_widget.dart index 7734d53..3dd3b1d 100644 --- a/packages/golden_toolkit/example/lib/src/shadow_widget.dart +++ b/packages/golden_toolkit/example/lib/src/shadow_widget.dart @@ -16,6 +16,8 @@ import 'package:flutter/widgets.dart'; /// refactor and clean it up! class ShadowWidget extends StatelessWidget { + const ShadowWidget({Key? key}) : super(key: key); + @override Widget build(BuildContext context) { return Padding( diff --git a/packages/golden_toolkit/example/lib/src/weather_widgets.dart b/packages/golden_toolkit/example/lib/src/weather_widgets.dart index 262c34b..6d4d691 100644 --- a/packages/golden_toolkit/example/lib/src/weather_widgets.dart +++ b/packages/golden_toolkit/example/lib/src/weather_widgets.dart @@ -131,14 +131,14 @@ class WeeklyForecastCompact extends StatelessWidget { @override Widget build(BuildContext context) { - return Container( + return SizedBox( height: 175, child: SingleChildScrollView( scrollDirection: Axis.horizontal, child: Row( crossAxisAlignment: CrossAxisAlignment.stretch, children: forecasts - .map((f) => Container( + .map((f) => SizedBox( width: MediaQuery.of(context).size.width * .3, child: WeatherCard.forecast(f), )) @@ -211,7 +211,7 @@ class WeatherCard extends StatelessWidget { //if screen is small, we want this card to be vertical as Column Widget _verticalCard(BuildContext context) { final cardTheme = CardTheme.of(context); - return Container( + return SizedBox( width: 180, child: Card( shape: cardTheme.shape ?? _cardShape, diff --git a/packages/golden_toolkit/example/pubspec.lock b/packages/golden_toolkit/example/pubspec.lock index 73552fa..2a9770b 100644 --- a/packages/golden_toolkit/example/pubspec.lock +++ b/packages/golden_toolkit/example/pubspec.lock @@ -7,7 +7,7 @@ packages: name: async url: "https://pub.dartlang.org" source: hosted - version: "2.6.1" + version: "2.8.1" boolean_selector: dependency: transitive description: @@ -28,7 +28,7 @@ packages: name: charcode url: "https://pub.dartlang.org" source: hosted - version: "1.2.0" + version: "1.3.1" clock: dependency: transitive description: @@ -55,6 +55,13 @@ packages: description: flutter source: sdk version: "0.0.0" + flutter_lints: + dependency: "direct dev" + description: + name: flutter_lints + url: "https://pub.dartlang.org" + source: hosted + version: "1.0.4" flutter_test: dependency: "direct dev" description: flutter @@ -67,6 +74,13 @@ packages: relative: true source: path version: "0.10.0" + lints: + dependency: transitive + description: + name: lints + url: "https://pub.dartlang.org" + source: hosted + version: "1.0.1" matcher: dependency: transitive description: @@ -80,7 +94,7 @@ packages: name: meta url: "https://pub.dartlang.org" source: hosted - version: "1.3.0" + version: "1.7.0" path: dependency: transitive description: @@ -88,13 +102,6 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "1.8.0" - pedantic: - dependency: "direct dev" - description: - name: pedantic - url: "https://pub.dartlang.org" - source: hosted - version: "1.10.0-nullsafety.3" sky_engine: dependency: transitive description: flutter @@ -141,7 +148,7 @@ packages: name: test_api url: "https://pub.dartlang.org" source: hosted - version: "0.3.0" + version: "0.4.2" typed_data: dependency: transitive description: diff --git a/packages/golden_toolkit/example/pubspec.yaml b/packages/golden_toolkit/example/pubspec.yaml index 5f0371f..eef077d 100644 --- a/packages/golden_toolkit/example/pubspec.yaml +++ b/packages/golden_toolkit/example/pubspec.yaml @@ -1,21 +1,21 @@ name: example description: Demonstrate how golden toolkit can be used to version: 0.0.1 -author: +publish_to: none environment: - sdk: '>=2.12.0-29.10.beta <3.0.0' + sdk: '>=2.12.0 <3.0.0' dependencies: flutter: sdk: flutter dev_dependencies: + flutter_lints: ^1.0.4 flutter_test: sdk: flutter golden_toolkit: path: ../ - pedantic: ^1.10.0-nullsafety.3 flutter: uses-material-design: true diff --git a/packages/golden_toolkit/example/test/flutter_demo_page_test.dart b/packages/golden_toolkit/example/test/flutter_demo_page_test.dart index be70a9c..caaac99 100644 --- a/packages/golden_toolkit/example/test/flutter_demo_page_test.dart +++ b/packages/golden_toolkit/example/test/flutter_demo_page_test.dart @@ -9,7 +9,7 @@ void main() { testGoldens('DeviceBuilder - one scenario - default devices', (tester) async { final builder = DeviceBuilder() ..addScenario( - widget: FlutterDemoPage(), + widget: const FlutterDemoPage(), name: 'default page', ); @@ -28,7 +28,7 @@ void main() { Device.tabletLandscape, ]) ..addScenario( - widget: FlutterDemoPage(), + widget: const FlutterDemoPage(), name: 'default page', ); @@ -48,11 +48,11 @@ void main() { Device.tabletLandscape, ]) ..addScenario( - widget: FlutterDemoPage(), + widget: const FlutterDemoPage(), name: 'default page', ) ..addScenario( - widget: FlutterDemoPage(), + widget: const FlutterDemoPage(), name: 'tap once', onCreate: (scenarioWidgetKey) async { final finder = find.descendant( @@ -64,7 +64,7 @@ void main() { }, ) ..addScenario( - widget: FlutterDemoPage(), + widget: const FlutterDemoPage(), name: 'tap five times', onCreate: (scenarioWidgetKey) async { final finder = find.descendant( diff --git a/packages/golden_toolkit/example/test/global_config/shadow_widget_test.dart b/packages/golden_toolkit/example/test/global_config/shadow_widget_test.dart index b56999a..f33979a 100644 --- a/packages/golden_toolkit/example/test/global_config/shadow_widget_test.dart +++ b/packages/golden_toolkit/example/test/global_config/shadow_widget_test.dart @@ -5,7 +5,7 @@ import '../../lib/src/shadow_widget.dart'; void main() { testGoldens('Shadows are globally enabled by default', (tester) async { - await tester.pumpWidgetBuilder(ShadowWidget()); + await tester.pumpWidgetBuilder(const ShadowWidget()); await screenMatchesGolden(tester, 'shadow_widget_globally_enabled_shadows'); }); @@ -15,7 +15,7 @@ void main() { testGoldens( 'Shadows can be disabled locally by wrapping in GoldenToolkit.runWithConfiguration', (tester) async { - await tester.pumpWidgetBuilder(ShadowWidget()); + await tester.pumpWidgetBuilder(const ShadowWidget()); await screenMatchesGolden( tester, 'shadow_widget_locally_disabled_shadows'); diff --git a/packages/golden_toolkit/example/test/shadow_widget_test.dart b/packages/golden_toolkit/example/test/shadow_widget_test.dart index d8ef47c..f1724c4 100644 --- a/packages/golden_toolkit/example/test/shadow_widget_test.dart +++ b/packages/golden_toolkit/example/test/shadow_widget_test.dart @@ -5,7 +5,7 @@ import '../lib/src/shadow_widget.dart'; void main() { testGoldens('Shadows are disabled by default', (tester) async { - await tester.pumpWidgetBuilder(ShadowWidget()); + await tester.pumpWidgetBuilder(const ShadowWidget()); await screenMatchesGolden(tester, 'shadow_widget_disabled_shadows'); }); @@ -15,7 +15,7 @@ void main() { testGoldens( 'Shadows can be enabled locally by wrapping in GoldenToolkit.runWithConfiguration', (tester) async { - await tester.pumpWidgetBuilder(ShadowWidget()); + await tester.pumpWidgetBuilder(const ShadowWidget()); await screenMatchesGolden( tester, 'shadow_widget_locally_enabled_shadows'); diff --git a/packages/golden_toolkit/lib/src/device.dart b/packages/golden_toolkit/lib/src/device.dart index e941015..0ba0ad3 100644 --- a/packages/golden_toolkit/lib/src/device.dart +++ b/packages/golden_toolkit/lib/src/device.dart @@ -87,6 +87,7 @@ class Device { textScale: textScale, brightness: Brightness.dark, safeArea: safeArea, + // ignore: unnecessary_string_escapes name: '$name\_dark', ); } diff --git a/packages/golden_toolkit/lib/src/device_builder.dart b/packages/golden_toolkit/lib/src/device_builder.dart index ffa3200..a815d38 100644 --- a/packages/golden_toolkit/lib/src/device_builder.dart +++ b/packages/golden_toolkit/lib/src/device_builder.dart @@ -190,7 +190,7 @@ class _DeviceScenarioWidget extends StatelessWidget { return MediaQuery( data: mergedMediaQuery, - child: Container( + child: SizedBox( width: device.size.width, height: device.size.height, child: widget, @@ -216,7 +216,7 @@ class _DeviceScenarioWidget extends StatelessWidget { crossAxisAlignment: CrossAxisAlignment.start, mainAxisSize: MainAxisSize.min, children: [ - Container( + SizedBox( height: 20, width: device.size.width, child: Text( diff --git a/packages/golden_toolkit/pubspec.lock b/packages/golden_toolkit/pubspec.lock index ac29d30..5da51b6 100644 --- a/packages/golden_toolkit/pubspec.lock +++ b/packages/golden_toolkit/pubspec.lock @@ -7,7 +7,7 @@ packages: name: async url: "https://pub.dartlang.org" source: hosted - version: "2.6.1" + version: "2.8.1" boolean_selector: dependency: transitive description: @@ -28,7 +28,7 @@ packages: name: charcode url: "https://pub.dartlang.org" source: hosted - version: "1.2.0" + version: "1.3.1" clock: dependency: transitive description: @@ -55,11 +55,25 @@ packages: description: flutter source: sdk version: "0.0.0" + flutter_lints: + dependency: "direct dev" + description: + name: flutter_lints + url: "https://pub.dartlang.org" + source: hosted + version: "1.0.4" flutter_test: dependency: "direct main" description: flutter source: sdk version: "0.0.0" + lints: + dependency: transitive + description: + name: lints + url: "https://pub.dartlang.org" + source: hosted + version: "1.0.1" matcher: dependency: transitive description: @@ -73,7 +87,7 @@ packages: name: meta url: "https://pub.dartlang.org" source: hosted - version: "1.3.0" + version: "1.7.0" path: dependency: transitive description: @@ -81,13 +95,6 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "1.8.0" - pedantic: - dependency: "direct dev" - description: - name: pedantic - url: "https://pub.dartlang.org" - source: hosted - version: "1.11.1" sample_dependency: dependency: "direct dev" description: @@ -141,7 +148,7 @@ packages: name: test_api url: "https://pub.dartlang.org" source: hosted - version: "0.3.0" + version: "0.4.2" typed_data: dependency: transitive description: diff --git a/packages/golden_toolkit/pubspec.yaml b/packages/golden_toolkit/pubspec.yaml index 411758c..ad0579d 100644 --- a/packages/golden_toolkit/pubspec.yaml +++ b/packages/golden_toolkit/pubspec.yaml @@ -16,10 +16,10 @@ dependencies: meta: ^1.1.8 dev_dependencies: - pedantic: ^1.11.1 + flutter_lints: ^1.0.4 sample_dependency: path: test/sample_dependency - test_api: ^0.3.0 + test_api: ^0.4.2 flutter: uses-material-design: true diff --git a/packages/golden_toolkit/test/configuration_test.dart b/packages/golden_toolkit/test/configuration_test.dart index 596989c..e62cbf9 100644 --- a/packages/golden_toolkit/test/configuration_test.dart +++ b/packages/golden_toolkit/test/configuration_test.dart @@ -150,6 +150,7 @@ void main() { config: GoldenToolkitConfiguration( deviceFileNameFactory: (filename, device) { actualDevices.add(device); + // ignore: unnecessary_string_escapes return '$filename\_${device.name}.png'; }, defaultDevices: [device1, device2], @@ -174,7 +175,7 @@ void main() { testGoldens( 'screenMatchesGolden method uses enableRealShadows from global configuration when GoldenToolkit.runWithConfiguration is outside testGoldens', (tester) async { - await tester.pumpWidgetBuilder(WidgetWithShadows()); + await tester.pumpWidgetBuilder(const WidgetWithShadows()); await screenMatchesGolden( tester, 'enableRealShadows_honored_when_testGoldens_wrapped'); @@ -190,7 +191,7 @@ void main() { (tester) async { await GoldenToolkit.runWithConfiguration( () async { - await tester.pumpWidgetBuilder(WidgetWithShadows()); + await tester.pumpWidgetBuilder(const WidgetWithShadows()); await screenMatchesGolden(tester, 'enableRealShadows_ignored_when_testGoldens_not_wrapped'); diff --git a/packages/golden_toolkit/test/device_builder_test.dart b/packages/golden_toolkit/test/device_builder_test.dart index 38d187d..fcbef66 100644 --- a/packages/golden_toolkit/test/device_builder_test.dart +++ b/packages/golden_toolkit/test/device_builder_test.dart @@ -201,7 +201,7 @@ void main() { // when final requiredSize = sut.requiredWidgetSize; - final widget = Container( + final widget = SizedBox( width: requiredSize.width + 100, height: requiredSize.height + 100, child: Directionality( diff --git a/packages/golden_toolkit/test/golden_assertion_test.dart b/packages/golden_toolkit/test/golden_assertion_test.dart index 37a8b29..38053ee 100644 --- a/packages/golden_toolkit/test/golden_assertion_test.dart +++ b/packages/golden_toolkit/test/golden_assertion_test.dart @@ -15,7 +15,7 @@ void main() { group('testGoldens validation', () { testWidgets('screenMatchesGolden should require testGoldens', (tester) async { - await tester.pumpWidgetBuilder(Container(height: 100, width: 100)); + await tester.pumpWidgetBuilder(const SizedBox(height: 100, width: 100)); await expectLater(() => screenMatchesGolden(tester, 'anything'), throwsA(isInstanceOf())); @@ -23,7 +23,7 @@ void main() { testGoldens('screenMatchesGolden filename should not include extension', (tester) async { - await tester.pumpWidget(Container(height: 100, width: 100)); + await tester.pumpWidget(const SizedBox(height: 100, width: 100)); await expectLater(() => screenMatchesGolden(tester, 'anything.png'), throwsAssertionError); diff --git a/packages/golden_toolkit/test/image_loading/image_loading_utils.dart b/packages/golden_toolkit/test/image_loading/image_loading_utils.dart index 0cbef73..fdce711 100644 --- a/packages/golden_toolkit/test/image_loading/image_loading_utils.dart +++ b/packages/golden_toolkit/test/image_loading/image_loading_utils.dart @@ -14,7 +14,7 @@ class ImageWidget extends StatelessWidget { @immutable class BoxDecorationWithImage extends StatelessWidget { - const BoxDecorationWithImage(); + const BoxDecorationWithImage({Key? key}) : super(key: key); @override Widget build(BuildContext context) { @@ -38,10 +38,11 @@ GoldenToolkitConfiguration get defaultConfiguration => @immutable class ListOfItemsWithOneImage extends StatelessWidget { const ListOfItemsWithOneImage({ + Key? key, required this.itemSize, required this.indexThatContainsImage, required this.cacheExtent, - }); + }) : super(key: key); final Size itemSize; final int indexThatContainsImage; diff --git a/packages/golden_toolkit/test/sample_dependency/analysis_options.yaml b/packages/golden_toolkit/test/sample_dependency/analysis_options.yaml new file mode 100644 index 0000000..a3be6b8 --- /dev/null +++ b/packages/golden_toolkit/test/sample_dependency/analysis_options.yaml @@ -0,0 +1 @@ +include: package:flutter_lints/flutter.yaml \ No newline at end of file diff --git a/packages/golden_toolkit/test/sample_dependency/pubspec.lock b/packages/golden_toolkit/test/sample_dependency/pubspec.lock index 51b65b4..9e5626b 100644 --- a/packages/golden_toolkit/test/sample_dependency/pubspec.lock +++ b/packages/golden_toolkit/test/sample_dependency/pubspec.lock @@ -7,26 +7,40 @@ packages: name: characters url: "https://pub.dartlang.org" source: hosted - version: "1.1.0-nullsafety.3" + version: "1.1.0" collection: dependency: transitive description: name: collection url: "https://pub.dartlang.org" source: hosted - version: "1.15.0-nullsafety.3" + version: "1.15.0" flutter: dependency: "direct main" description: flutter source: sdk version: "0.0.0" + flutter_lints: + dependency: "direct dev" + description: + name: flutter_lints + url: "https://pub.dartlang.org" + source: hosted + version: "1.0.4" + lints: + dependency: transitive + description: + name: lints + url: "https://pub.dartlang.org" + source: hosted + version: "1.0.1" meta: dependency: transitive description: name: meta url: "https://pub.dartlang.org" source: hosted - version: "1.3.0-nullsafety.3" + version: "1.7.0" sky_engine: dependency: transitive description: flutter @@ -38,13 +52,13 @@ packages: name: typed_data url: "https://pub.dartlang.org" source: hosted - version: "1.3.0-nullsafety.3" + version: "1.3.0" vector_math: dependency: transitive description: name: vector_math url: "https://pub.dartlang.org" source: hosted - version: "2.1.0-nullsafety.3" + version: "2.1.0" sdks: - dart: ">=2.12.0-0 <3.0.0" + dart: ">=2.12.0 <3.0.0" diff --git a/packages/golden_toolkit/test/sample_dependency/pubspec.yaml b/packages/golden_toolkit/test/sample_dependency/pubspec.yaml index 8e086b1..cc8a839 100644 --- a/packages/golden_toolkit/test/sample_dependency/pubspec.yaml +++ b/packages/golden_toolkit/test/sample_dependency/pubspec.yaml @@ -1,14 +1,18 @@ name: sample_dependency description: A sample dependency that includes fonts to validate golden_toolkit's loadAppFonts() helper version: 0.0.1 -author: +publish_to: none environment: - sdk: ">=2.1.0 <3.0.0" + sdk: ">=2.12.0 <3.0.0" dependencies: flutter: sdk: flutter + +dev_dependencies: + flutter_lints: ^1.0.4 + flutter: assets: - images/ diff --git a/packages/golden_toolkit/test/sample_widgets.dart b/packages/golden_toolkit/test/sample_widgets.dart index c85c984..35aa308 100644 --- a/packages/golden_toolkit/test/sample_widgets.dart +++ b/packages/golden_toolkit/test/sample_widgets.dart @@ -2,6 +2,8 @@ import 'package:flutter/material.dart'; import 'package:flutter/widgets.dart'; class WidgetWithShadows extends StatelessWidget { + const WidgetWithShadows({Key? key}) : super(key: key); + @override Widget build(BuildContext context) { const borderRadius = BorderRadius.all(Radius.circular(10)); diff --git a/packages/golden_toolkit/test/shadows/shadows_test.dart b/packages/golden_toolkit/test/shadows/shadows_test.dart index 144c7d2..c4a66c9 100644 --- a/packages/golden_toolkit/test/shadows/shadows_test.dart +++ b/packages/golden_toolkit/test/shadows/shadows_test.dart @@ -28,7 +28,7 @@ void main() { testGoldens( 'screenMatchesGolden method uses enableRealShadows from global configuration (flutter_test_config.dart)', (tester) async { - await tester.pumpWidgetBuilder(WidgetWithShadows()); + await tester.pumpWidgetBuilder(const WidgetWithShadows()); await screenMatchesGolden(tester, 'realShadows_enabled_globally'); expect(debugDisableShadows, isFalse, @@ -41,7 +41,7 @@ void main() { testGoldens( 'screenMatchesGolden method can disable enableRealShadows temporarily', (tester) async { - await tester.pumpWidgetBuilder(WidgetWithShadows()); + await tester.pumpWidgetBuilder(const WidgetWithShadows()); await screenMatchesGolden(tester, 'realShadows_disabled_locally'); expect(debugDisableShadows, isTrue,