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

@@ -111,7 +111,7 @@ const CommonFinders find = CommonFinders._();
/// If computation is asynchronous, the function may return a [Future].
///
/// See also [FlutterDriver.waitFor].
typedef dynamic EvaluatorFunction();
typedef EvaluatorFunction = dynamic Function();
/// Drives a Flutter Application running in another process.
class FlutterDriver {
@@ -784,7 +784,7 @@ class VMServiceClientConnection {
}
/// A function that connects to a Dart VM service given the [url].
typedef Future<VMServiceClientConnection> VMServiceConnectFunction(String url);
typedef VMServiceConnectFunction = Future<VMServiceClientConnection> Function(String url);
/// The connection function used by [FlutterDriver.connect].
///

View File

@@ -34,7 +34,7 @@ const String _extensionMethod = 'ext.flutter.$_extensionMethodName';
///
/// Messages are described in string form and should return a [Future] which
/// eventually completes to a string response.
typedef Future<String> DataHandler(String message);
typedef DataHandler = Future<String> Function(String message);
class _DriverBinding extends BindingBase with ServicesBinding, SchedulerBinding, GestureBinding, PaintingBinding, SemanticsBinding, RendererBinding, WidgetsBinding {
_DriverBinding(this._handler, this._silenceErrors);
@@ -75,14 +75,14 @@ void enableFlutterDriverExtension({ DataHandler handler, bool silenceErrors = fa
}
/// Signature for functions that handle a command and return a result.
typedef Future<Result> CommandHandlerCallback(Command c);
typedef CommandHandlerCallback = Future<Result> Function(Command c);
/// Signature for functions that deserialize a JSON map to a command object.
typedef Command CommandDeserializerCallback(Map<String, String> params);
typedef CommandDeserializerCallback = Command Function(Map<String, String> params);
/// Signature for functions that run the given finder and return the [Element]
/// found, if any, or null otherwise.
typedef Finder FinderConstructor(SerializableFinder finder);
typedef FinderConstructor = Finder Function(SerializableFinder finder);
/// The class that manages communication between a Flutter Driver test and the
/// application being remote-controlled, on the application side.