enable lint prefer_generic_function_type_aliases (#21680)
This commit is contained in:
committed by
GitHub
parent
6c3adcf60f
commit
a07d3719a1
@@ -11,7 +11,7 @@ import 'package:flutter_tools/src/runner/flutter_command.dart';
|
||||
import '../src/common.dart';
|
||||
import '../src/context.dart';
|
||||
|
||||
typedef FutureOr<Null> _TestMethod();
|
||||
typedef _TestMethod = FutureOr<Null> Function();
|
||||
|
||||
void main() {
|
||||
Cache.disableLocking();
|
||||
|
||||
@@ -146,7 +146,7 @@ void main() {
|
||||
});
|
||||
}
|
||||
|
||||
typedef void StartCallback(List<dynamic> command);
|
||||
typedef StartCallback = void Function(List<dynamic> command);
|
||||
|
||||
class MockProcessManager implements ProcessManager {
|
||||
MockProcessManager(this.fakeExitCode);
|
||||
|
||||
@@ -18,7 +18,7 @@ import 'package:process/process.dart';
|
||||
import '../src/common.dart';
|
||||
import '../src/context.dart';
|
||||
|
||||
typedef Future<ProcessResult> InvokeProcess();
|
||||
typedef InvokeProcess = Future<ProcessResult> Function();
|
||||
|
||||
void main() {
|
||||
FileSystem fs;
|
||||
|
||||
@@ -161,7 +161,7 @@ void main() {
|
||||
|
||||
}
|
||||
|
||||
typedef Future<FlutterCommandResult> CommandFunction();
|
||||
typedef CommandFunction = Future<FlutterCommandResult> Function();
|
||||
|
||||
class DummyFlutterCommand extends FlutterCommand {
|
||||
|
||||
|
||||
@@ -34,7 +34,7 @@ BufferLogger get testLogger => context[Logger];
|
||||
MockDeviceManager get testDeviceManager => context[DeviceManager];
|
||||
MockDoctor get testDoctor => context[Doctor];
|
||||
|
||||
typedef void ContextInitializer(AppContext testContext);
|
||||
typedef ContextInitializer = void Function(AppContext testContext);
|
||||
|
||||
@isTest
|
||||
void testUsingContext(String description, dynamic testMethod(), {
|
||||
|
||||
@@ -109,7 +109,7 @@ ro.build.version.codename=REL
|
||||
}
|
||||
|
||||
/// A strategy for creating Process objects from a list of commands.
|
||||
typedef Process ProcessFactory(List<String> command);
|
||||
typedef ProcessFactory = Process Function(List<String> command);
|
||||
|
||||
/// A ProcessManager that starts Processes by delegating to a ProcessFactory.
|
||||
class MockProcessManager implements ProcessManager {
|
||||
|
||||
Reference in New Issue
Block a user