Enable use_function_type_syntax_for_parameters lint (#77163)
This commit is contained in:
committed by
GitHub
parent
8f9c6af2dd
commit
7b251f5f37
@@ -652,7 +652,7 @@ class FakeWorkingAndroidConsoleSocket extends Fake implements Socket {
|
||||
final StreamController<String> _controller = StreamController<String>();
|
||||
|
||||
@override
|
||||
Stream<E> asyncMap<E>(FutureOr<E> convert(Uint8List event)) => _controller.stream as Stream<E>;
|
||||
Stream<E> asyncMap<E>(FutureOr<E> Function(Uint8List event) convert) => _controller.stream as Stream<E>;
|
||||
|
||||
@override
|
||||
void add(List<int> data) {
|
||||
@@ -676,7 +676,7 @@ class FakeUnresponsiveAndroidConsoleSocket extends Fake implements Socket {
|
||||
final StreamController<String> _controller = StreamController<String>();
|
||||
|
||||
@override
|
||||
Stream<E> asyncMap<E>(FutureOr<E> convert(Uint8List event)) => _controller.stream as Stream<E>;
|
||||
Stream<E> asyncMap<E>(FutureOr<E> Function(Uint8List event) convert) => _controller.stream as Stream<E>;
|
||||
|
||||
@override
|
||||
void add(List<int> data) {}
|
||||
@@ -697,7 +697,7 @@ class FakeDisconnectingAndroidConsoleSocket extends Fake implements Socket {
|
||||
final StreamController<String> _controller = StreamController<String>();
|
||||
|
||||
@override
|
||||
Stream<E> asyncMap<E>(FutureOr<E> convert(Uint8List event)) => _controller.stream as Stream<E>;
|
||||
Stream<E> asyncMap<E>(FutureOr<E> Function(Uint8List event) convert) => _controller.stream as Stream<E>;
|
||||
|
||||
@override
|
||||
void add(List<int> data) {
|
||||
|
||||
@@ -325,7 +325,7 @@ include ':app'
|
||||
android = fakePlatform('android');
|
||||
});
|
||||
|
||||
void testUsingAndroidContext(String description, dynamic testMethod()) {
|
||||
void testUsingAndroidContext(String description, dynamic Function() testMethod) {
|
||||
testUsingContext(description, testMethod, overrides: <Type, Generator>{
|
||||
Artifacts: () => localEngineArtifacts,
|
||||
Platform: () => android,
|
||||
|
||||
@@ -388,7 +388,7 @@ void main() {
|
||||
List<String> outputStdout() => mockStdio.writtenToStdout.join('').split('\n');
|
||||
List<String> outputStderr() => mockStdio.writtenToStderr.join('').split('\n');
|
||||
|
||||
void doWhileAsync(FakeAsync time, bool doThis()) {
|
||||
void doWhileAsync(FakeAsync time, bool Function() doThis) {
|
||||
do {
|
||||
mockStopwatch.elapsed += const Duration(milliseconds: 1);
|
||||
time.elapse(const Duration(milliseconds: 1));
|
||||
|
||||
@@ -649,7 +649,7 @@ Information about project "Runner":
|
||||
fs.file(xcodebuild).createSync(recursive: true);
|
||||
});
|
||||
|
||||
void testUsingOsxContext(String description, dynamic testMethod()) {
|
||||
void testUsingOsxContext(String description, dynamic Function() testMethod) {
|
||||
testUsingContext(description, testMethod, overrides: <Type, Generator>{
|
||||
Artifacts: () => localArtifacts,
|
||||
Platform: () => macOS,
|
||||
|
||||
@@ -379,7 +379,7 @@ apply plugin: 'kotlin-android'
|
||||
);
|
||||
});
|
||||
|
||||
void testWithMocks(String description, Future<void> testMethod()) {
|
||||
void testWithMocks(String description, Future<void> Function() testMethod) {
|
||||
testUsingContext(description, testMethod, overrides: <Type, Generator>{
|
||||
FileSystem: () => fs,
|
||||
ProcessManager: () => FakeProcessManager.any(),
|
||||
@@ -808,7 +808,7 @@ flutter:
|
||||
/// Executes the [testMethod] in a context where the file system
|
||||
/// is in memory.
|
||||
@isTest
|
||||
void _testInMemory(String description, Future<void> testMethod()) {
|
||||
void _testInMemory(String description, Future<void> Function() testMethod) {
|
||||
Cache.flutterRoot = getFlutterRoot();
|
||||
final FileSystem testFileSystem = MemoryFileSystem(
|
||||
style: globals.platform.isWindows ? FileSystemStyle.windows : FileSystemStyle.posix,
|
||||
@@ -896,7 +896,7 @@ void expectNotExists(FileSystemEntity entity) {
|
||||
expect(entity.existsSync(), isFalse);
|
||||
}
|
||||
|
||||
void addIosProjectFile(Directory directory, {String projectFileContent()}) {
|
||||
void addIosProjectFile(Directory directory, {String Function() projectFileContent}) {
|
||||
directory
|
||||
.childDirectory('ios')
|
||||
.childDirectory('Runner.xcodeproj')
|
||||
@@ -905,7 +905,7 @@ void addIosProjectFile(Directory directory, {String projectFileContent()}) {
|
||||
..writeAsStringSync(projectFileContent());
|
||||
}
|
||||
|
||||
void addAndroidGradleFile(Directory directory, { String gradleFileContent() }) {
|
||||
void addAndroidGradleFile(Directory directory, { String Function() gradleFileContent }) {
|
||||
directory
|
||||
.childDirectory('android')
|
||||
.childDirectory('app')
|
||||
|
||||
@@ -179,7 +179,7 @@ Matcher containsIgnoringWhitespace(String toSearch) {
|
||||
/// system temporary directory are deleted after each test by calling
|
||||
/// `LocalFileSystem.dispose()`.
|
||||
@isTest
|
||||
void test(String description, FutureOr<void> body(), {
|
||||
void test(String description, FutureOr<void> Function() body, {
|
||||
String testOn,
|
||||
Timeout timeout,
|
||||
dynamic skip,
|
||||
@@ -213,7 +213,7 @@ void test(String description, FutureOr<void> body(), {
|
||||
///
|
||||
/// For more information, see https://github.com/flutter/flutter/issues/47161
|
||||
@isTest
|
||||
void testWithoutContext(String description, FutureOr<void> body(), {
|
||||
void testWithoutContext(String description, FutureOr<void> Function() body, {
|
||||
String testOn,
|
||||
Timeout timeout,
|
||||
dynamic skip,
|
||||
|
||||
@@ -56,7 +56,7 @@ typedef ContextInitializer = void Function(AppContext testContext);
|
||||
@isTest
|
||||
void testUsingContext(
|
||||
String description,
|
||||
dynamic testMethod(), {
|
||||
dynamic Function() testMethod, {
|
||||
Map<Type, Generator> overrides = const <Type, Generator>{},
|
||||
bool initializeFlutterRoot = true,
|
||||
String testOn,
|
||||
|
||||
Reference in New Issue
Block a user