enable lint prefer_generic_function_type_aliases (#21680)
diff --git a/dev/bots/analyze.dart b/dev/bots/analyze.dart index e9e8a76..ec41f2c 100644 --- a/dev/bots/analyze.dart +++ b/dev/bots/analyze.dart
@@ -11,7 +11,7 @@ import 'run_command.dart'; -typedef Future<Null> ShardRunner(); +typedef ShardRunner = Future<Null> Function(); final String flutterRoot = path.dirname(path.dirname(path.dirname(path.fromUri(Platform.script)))); final String flutter = path.join(flutterRoot, 'bin', Platform.isWindows ? 'flutter.bat' : 'flutter');
diff --git a/dev/bots/prepare_package.dart b/dev/bots/prepare_package.dart index 64f8ed6..6926763 100644 --- a/dev/bots/prepare_package.dart +++ b/dev/bots/prepare_package.dart
@@ -175,7 +175,7 @@ } } -typedef Future<Uint8List> HttpReader(Uri url, {Map<String, String> headers}); +typedef HttpReader = Future<Uint8List> Function(Uri url, {Map<String, String> headers}); /// Creates a pre-populated Flutter archive from a git repo. class ArchiveCreator {
diff --git a/dev/bots/test.dart b/dev/bots/test.dart index 983f796..32e083a 100644 --- a/dev/bots/test.dart +++ b/dev/bots/test.dart
@@ -9,7 +9,7 @@ import 'run_command.dart'; -typedef Future<Null> ShardRunner(); +typedef ShardRunner = Future<Null> Function(); final String flutterRoot = path.dirname(path.dirname(path.dirname(path.fromUri(Platform.script)))); final String flutter = path.join(flutterRoot, 'bin', Platform.isWindows ? 'flutter.bat' : 'flutter');
diff --git a/dev/bots/test/fake_process_manager.dart b/dev/bots/test/fake_process_manager.dart index 719cf6e..779d7a5 100644 --- a/dev/bots/test/fake_process_manager.dart +++ b/dev/bots/test/fake_process_manager.dart
@@ -151,7 +151,7 @@ } /// Callback used to receive stdin input when it occurs. -typedef void StringReceivedCallback(String received); +typedef StringReceivedCallback = void Function(String received); /// A stream consumer class that consumes UTF8 strings as lists of ints. class StringStreamConsumer implements StreamConsumer<List<int>> {
diff --git a/dev/devicelab/lib/framework/framework.dart b/dev/devicelab/lib/framework/framework.dart index 5bf7edb..f3583f0 100644 --- a/dev/devicelab/lib/framework/framework.dart +++ b/dev/devicelab/lib/framework/framework.dart
@@ -20,7 +20,7 @@ /// Represents a unit of work performed in the CI environment that can /// succeed, fail and be retried independently of others. -typedef Future<TaskResult> TaskFunction(); +typedef TaskFunction = Future<TaskResult> Function(); bool _isTaskRegistered = false;
diff --git a/dev/devicelab/test/adb_test.dart b/dev/devicelab/test/adb_test.dart index 525746f..17c0736 100644 --- a/dev/devicelab/test/adb_test.dart +++ b/dev/devicelab/test/adb_test.dart
@@ -122,7 +122,7 @@ ); } -typedef dynamic ExitErrorFactory(); +typedef ExitErrorFactory = dynamic Function(); class CommandArgs { CommandArgs({ this.command, this.arguments, this.environment });
diff --git a/dev/integration_tests/channels/lib/src/test_step.dart b/dev/integration_tests/channels/lib/src/test_step.dart index 04394f2..39caab2 100644 --- a/dev/integration_tests/channels/lib/src/test_step.dart +++ b/dev/integration_tests/channels/lib/src/test_step.dart
@@ -11,7 +11,7 @@ enum TestStatus { ok, pending, failed, complete } -typedef Future<TestStepResult> TestStep(); +typedef TestStep = Future<TestStepResult> Function(); const String nothing = '-';
diff --git a/dev/integration_tests/platform_interaction/lib/src/test_step.dart b/dev/integration_tests/platform_interaction/lib/src/test_step.dart index 7313e57..1da4766 100644 --- a/dev/integration_tests/platform_interaction/lib/src/test_step.dart +++ b/dev/integration_tests/platform_interaction/lib/src/test_step.dart
@@ -8,7 +8,7 @@ enum TestStatus { ok, pending, failed, complete } -typedef Future<TestStepResult> TestStep(); +typedef TestStep = Future<TestStepResult> Function(); const String nothing = '-';
diff --git a/dev/manual_tests/lib/material_arc.dart b/dev/manual_tests/lib/material_arc.dart index e4afb81..06cdf9f 100644 --- a/dev/manual_tests/lib/material_arc.dart +++ b/dev/manual_tests/lib/material_arc.dart
@@ -396,7 +396,7 @@ } } -typedef Widget _DemoBuilder(_ArcDemo demo); +typedef _DemoBuilder = Widget Function(_ArcDemo demo); class _ArcDemo { _ArcDemo(this.title, this.builder, TickerProvider vsync)
diff --git a/dev/manual_tests/lib/overlay_geometry.dart b/dev/manual_tests/lib/overlay_geometry.dart index e73cb75..3f1cb37 100644 --- a/dev/manual_tests/lib/overlay_geometry.dart +++ b/dev/manual_tests/lib/overlay_geometry.dart
@@ -92,7 +92,7 @@ OverlayGeometryAppState createState() => OverlayGeometryAppState(); } -typedef void CardTapCallback(GlobalKey targetKey, Offset globalPosition); +typedef CardTapCallback = void Function(GlobalKey targetKey, Offset globalPosition); class CardBuilder extends SliverChildDelegate { CardBuilder({ this.cardModels, this.onTapUp });