Update typedef syntax to use Function notation and turn on lint for old notation. (#18362)

Now that Dart 1 is turned off, reapplying my change to turn on the prefer_generic_function_type_aliases analysis option, and fix all the typedefs to Dart 2 preferred syntax.

Also eliminated the unused analysis_options_repo.yaml file and turned on public_member_api_docs in analysys_options.yaml.

No logic changes, just changing the typedef syntax for all typedefs, and updating analysis options.
This commit is contained in:
Greg Spencer
2018-06-11 15:51:45 -07:00
committed by GitHub
parent 3019ad976d
commit 6c56bb2420
130 changed files with 216 additions and 371 deletions

View File

@@ -175,7 +175,7 @@ class ProcessRunner {
}
}
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 {

View File

@@ -8,7 +8,7 @@ import 'dart:io';
import 'package:path/path.dart' as path;
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');

View File

@@ -150,7 +150,7 @@ class FakeProcess extends Mock implements Process {
}
/// 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>> {