enable lint prefer_generic_function_type_aliases (#21680)

This commit is contained in:
Alexandre Ardhuin
2018-09-14 21:06:19 +02:00
committed by GitHub
parent 6c3adcf60f
commit a07d3719a1
133 changed files with 217 additions and 217 deletions

View File

@@ -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();

View File

@@ -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);

View File

@@ -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;

View File

@@ -161,7 +161,7 @@ void main() {
}
typedef Future<FlutterCommandResult> CommandFunction();
typedef CommandFunction = Future<FlutterCommandResult> Function();
class DummyFlutterCommand extends FlutterCommand {

View File

@@ -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(), {

View File

@@ -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 {