diff --git a/dev/devicelab/lib/tasks/new_gallery.dart b/dev/devicelab/lib/tasks/new_gallery.dart index 9e5e458d466..a5331ea9806 100644 --- a/dev/devicelab/lib/tasks/new_gallery.dart +++ b/dev/devicelab/lib/tasks/new_gallery.dart @@ -8,7 +8,7 @@ import 'perf_tests.dart'; class NewGalleryPerfTest extends PerfTest { NewGalleryPerfTest({ String timelineFileName = 'transitions', - String dartDefine = '', + super.dartDefine = '', super.enableImpeller, super.timeoutSeconds, super.forceOpenGLES, @@ -16,7 +16,6 @@ class NewGalleryPerfTest extends PerfTest { '${flutterDirectory.path}/dev/integration_tests/new_gallery', 'test_driver/transitions_perf.dart', timelineFileName, - dartDefine: dartDefine, createPlatforms: ['android', 'ios', 'web'], enableMergedPlatformThread: true, ); diff --git a/dev/integration_tests/android_views/lib/motion_events_page.dart b/dev/integration_tests/android_views/lib/motion_events_page.dart index 907c2ccc844..63695959298 100644 --- a/dev/integration_tests/android_views/lib/motion_events_page.dart +++ b/dev/integration_tests/android_views/lib/motion_events_page.dart @@ -18,8 +18,8 @@ MethodChannel channel = const MethodChannel('android_views_integration'); const String kEventsFileName = 'touchEvents'; class MotionEventsPage extends PageWidget { - const MotionEventsPage({Key? key}) - : super('Motion Event Tests', const ValueKey('MotionEventsListTile'), key: key); + const MotionEventsPage({super.key}) + : super('Motion Event Tests', const ValueKey('MotionEventsListTile')); @override Widget build(BuildContext context) { @@ -135,10 +135,11 @@ class MotionEventsBodyState extends State { 'packages/assets_for_android_views/assets/touchEvents', ); final unTypedRecordedEvents = codec.decodeMessage(data) as List; - final List> recordedEvents = unTypedRecordedEvents - .cast>() - .map>((Map e) => e.cast()) - .toList(); + final List> recordedEvents = + unTypedRecordedEvents + .cast>() + .map>((Map e) => e.cast()) + .toList(); await channel.invokeMethod('pipeFlutterViewEvents'); await viewChannel?.invokeMethod('pipeTouchEvents'); print('replaying ${recordedEvents.length} motion events'); @@ -305,8 +306,8 @@ class TouchEventDiff extends StatelessWidget { buffer.write('pointer: ${getPointerIdx(action)} '); } - final List> coords = (event['pointerCoords'] as List) - .cast>(); + final List> coords = + (event['pointerCoords'] as List).cast>(); for (var i = 0; i < coords.length; i++) { buffer.write( 'p$i x: ${coords[i]['x']} y: ${coords[i]['y']}, pressure: ${coords[i]['pressure']} ', diff --git a/dev/integration_tests/android_views/lib/wm_integrations.dart b/dev/integration_tests/android_views/lib/wm_integrations.dart index 5b3fc723229..af66e1e7800 100644 --- a/dev/integration_tests/android_views/lib/wm_integrations.dart +++ b/dev/integration_tests/android_views/lib/wm_integrations.dart @@ -10,12 +10,8 @@ import 'package:flutter/services.dart'; import 'page.dart'; class WindowManagerIntegrationsPage extends PageWidget { - const WindowManagerIntegrationsPage({Key? key}) - : super( - 'Window Manager Integrations Tests', - const ValueKey('WmIntegrationsListTile'), - key: key, - ); + const WindowManagerIntegrationsPage({super.key}) + : super('Window Manager Integrations Tests', const ValueKey('WmIntegrationsListTile')); @override Widget build(BuildContext context) => const WindowManagerBody(); diff --git a/dev/integration_tests/flutter_gallery/lib/demo/calculator/home.dart b/dev/integration_tests/flutter_gallery/lib/demo/calculator/home.dart index 4af9d21cd2f..1c76ddd3c4a 100644 --- a/dev/integration_tests/flutter_gallery/lib/demo/calculator/home.dart +++ b/dev/integration_tests/flutter_gallery/lib/demo/calculator/home.dart @@ -214,9 +214,7 @@ class KeyRow extends StatelessWidget { @override Widget build(BuildContext context) { - return Expanded( - child: Row(mainAxisAlignment: MainAxisAlignment.center, children: keys), - ); + return Expanded(child: Row(mainAxisAlignment: MainAxisAlignment.center, children: keys)); } } @@ -248,8 +246,8 @@ class CalcKey extends StatelessWidget { } class NumberKey extends CalcKey { - NumberKey(int value, CalculatorState? calcState, {Key? key}) + NumberKey(int value, CalculatorState? calcState, {super.key}) : super('$value', () { calcState!.handleNumberTap(value); - }, key: key); + }); } diff --git a/dev/integration_tests/hybrid_android_views/lib/motion_events_page.dart b/dev/integration_tests/hybrid_android_views/lib/motion_events_page.dart index e60c5673859..9b4d8b99cde 100644 --- a/dev/integration_tests/hybrid_android_views/lib/motion_events_page.dart +++ b/dev/integration_tests/hybrid_android_views/lib/motion_events_page.dart @@ -17,8 +17,8 @@ import 'page.dart'; const String kEventsFileName = 'touchEvents'; class MotionEventsPage extends PageWidget { - const MotionEventsPage({Key? key}) - : super('Motion Event Tests', const ValueKey('MotionEventsListTile'), key: key); + const MotionEventsPage({super.key}) + : super('Motion Event Tests', const ValueKey('MotionEventsListTile')); @override Widget build(BuildContext context) { diff --git a/dev/integration_tests/hybrid_android_views/lib/nested_view_event_page.dart b/dev/integration_tests/hybrid_android_views/lib/nested_view_event_page.dart index 87ee8409f76..e1c99f7cc27 100644 --- a/dev/integration_tests/hybrid_android_views/lib/nested_view_event_page.dart +++ b/dev/integration_tests/hybrid_android_views/lib/nested_view_event_page.dart @@ -12,8 +12,8 @@ import 'future_data_handler.dart'; import 'page.dart'; class NestedViewEventPage extends PageWidget { - const NestedViewEventPage({Key? key}) - : super('Nested View Event Tests', const ValueKey('NestedViewEventTile'), key: key); + const NestedViewEventPage({super.key}) + : super('Nested View Event Tests', const ValueKey('NestedViewEventTile')); @override Widget build(BuildContext context) => const NestedViewEventBody(); diff --git a/dev/snippets/lib/src/data_types.dart b/dev/snippets/lib/src/data_types.dart index ed32204330b..5965af0b05e 100644 --- a/dev/snippets/lib/src/data_types.dart +++ b/dev/snippets/lib/src/data_types.dart @@ -157,18 +157,17 @@ abstract class CodeSample { /// Snippets are code that is not meant to be run as a complete application, but /// rather as a code usage example. class SnippetSample extends CodeSample { - SnippetSample(List input, {required int index, required SourceLine lineProto}) + SnippetSample(List input, {required super.index, required super.lineProto}) : assumptions = [], - super(['snippet'], input, index: index, lineProto: lineProto); + super(['snippet'], input); factory SnippetSample.combine( List sections, { required int index, required SourceLine lineProto, }) { - final List code = sections - .expand((SnippetSample section) => section.input) - .toList(); + final List code = + sections.expand((SnippetSample section) => section.input).toList(); return SnippetSample(code, index: index, lineProto: lineProto); } @@ -445,9 +444,10 @@ class SourceElement { int get dartpadSampleCount => samples.whereType().length; /// The number of [ApplicationSample]s in the dartdoc comment for this element. - int get applicationSampleCount => samples.where((CodeSample sample) { - return sample is ApplicationSample && sample is! DartpadSample; - }).length; + int get applicationSampleCount => + samples.where((CodeSample sample) { + return sample is ApplicationSample && sample is! DartpadSample; + }).length; /// The number of [SnippetSample]s in the dartdoc comment for this element. int get snippetCount => samples.whereType().length;