Fix missing return statements on function literals (#31825)
This commit is contained in:
parent
66a6726306
commit
9c77e8e8a0
@ -162,6 +162,7 @@ class KeyData {
|
|||||||
final String androidName = match.group(2);
|
final String androidName = match.group(2);
|
||||||
result[androidName] ??= <int>[];
|
result[androidName] ??= <int>[];
|
||||||
result[androidName].add(int.parse(match.group(1)));
|
result[androidName].add(int.parse(match.group(1)));
|
||||||
|
return null;
|
||||||
});
|
});
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
@ -178,9 +179,9 @@ class KeyData {
|
|||||||
headerFile = headerFile.replaceAllMapped(enumBlock, (Match match) => match.group(1));
|
headerFile = headerFile.replaceAllMapped(enumBlock, (Match match) => match.group(1));
|
||||||
final RegExp enumEntry = RegExp(r'''AKEYCODE_([A-Z0-9_]+)\s*=\s*([0-9]+),?''');
|
final RegExp enumEntry = RegExp(r'''AKEYCODE_([A-Z0-9_]+)\s*=\s*([0-9]+),?''');
|
||||||
final Map<String, int> result = <String, int>{};
|
final Map<String, int> result = <String, int>{};
|
||||||
headerFile.replaceAllMapped(enumEntry, (Match match) {
|
for (Match match in enumEntry.allMatches(headerFile)) {
|
||||||
result[match.group(1)] = int.parse(match.group(2));
|
result[match.group(1)] = int.parse(match.group(2));
|
||||||
});
|
}
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -193,9 +194,9 @@ class KeyData {
|
|||||||
// Only get the KEY definitions, ignore the rest (mouse, joystick, etc).
|
// Only get the KEY definitions, ignore the rest (mouse, joystick, etc).
|
||||||
final RegExp enumEntry = RegExp(r'''define GLFW_KEY_([A-Z0-9_]+)\s*([A-Z0-9_]+),?''');
|
final RegExp enumEntry = RegExp(r'''define GLFW_KEY_([A-Z0-9_]+)\s*([A-Z0-9_]+),?''');
|
||||||
final Map<String, dynamic> replaced = <String, dynamic>{};
|
final Map<String, dynamic> replaced = <String, dynamic>{};
|
||||||
headerFile.replaceAllMapped(enumEntry, (Match match) {
|
for (Match match in enumEntry.allMatches(headerFile)) {
|
||||||
replaced[match.group(1)] = int.tryParse(match.group(2)) ?? match.group(2).replaceAll('GLFW_KEY_', '');
|
replaced[match.group(1)] = int.tryParse(match.group(2)) ?? match.group(2).replaceAll('GLFW_KEY_', '');
|
||||||
});
|
}
|
||||||
final Map<String, int> result = <String, int>{};
|
final Map<String, int> result = <String, int>{};
|
||||||
replaced.forEach((String key, dynamic value) {
|
replaced.forEach((String key, dynamic value) {
|
||||||
// Some definition values point to other definitions (e.g #define GLFW_KEY_LAST GLFW_KEY_MENU).
|
// Some definition values point to other definitions (e.g #define GLFW_KEY_LAST GLFW_KEY_MENU).
|
||||||
|
@ -182,7 +182,7 @@ class FlutterDevice {
|
|||||||
// The flutterExit message only returns if it fails, so just wait a few
|
// The flutterExit message only returns if it fails, so just wait a few
|
||||||
// seconds then assume it worked.
|
// seconds then assume it worked.
|
||||||
// TODO(ianh): We should make this return once the VM service disconnects.
|
// TODO(ianh): We should make this return once the VM service disconnects.
|
||||||
await Future.wait(futures).timeout(const Duration(seconds: 2), onTimeout: () { });
|
await Future.wait(futures).timeout(const Duration(seconds: 2), onTimeout: () => <void>[]);
|
||||||
}
|
}
|
||||||
|
|
||||||
Future<Uri> setupDevFS(
|
Future<Uri> setupDevFS(
|
||||||
|
@ -446,6 +446,7 @@ class HotRunner extends ResidentRunner {
|
|||||||
// Resume the isolate so that it can be killed by the embedder.
|
// Resume the isolate so that it can be killed by the embedder.
|
||||||
return view.uiIsolate.resume();
|
return view.uiIsolate.resume();
|
||||||
}
|
}
|
||||||
|
return null;
|
||||||
},
|
},
|
||||||
).whenComplete(
|
).whenComplete(
|
||||||
() { completer.complete(null); },
|
() { completer.complete(null); },
|
||||||
|
@ -366,6 +366,7 @@ abstract class FlutterTestDriver {
|
|||||||
_debugPrint('$task...');
|
_debugPrint('$task...');
|
||||||
return callback()..timeout(timeout, onTimeout: () {
|
return callback()..timeout(timeout, onTimeout: () {
|
||||||
_debugPrint('$task is taking longer than usual...');
|
_debugPrint('$task is taking longer than usual...');
|
||||||
|
return null;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -388,6 +389,7 @@ abstract class FlutterTestDriver {
|
|||||||
print(messages.toString());
|
print(messages.toString());
|
||||||
timeoutExpired = true;
|
timeoutExpired = true;
|
||||||
print('$task is taking longer than usual...');
|
print('$task is taking longer than usual...');
|
||||||
|
return null;
|
||||||
});
|
});
|
||||||
|
|
||||||
return future.catchError((dynamic error) {
|
return future.catchError((dynamic error) {
|
||||||
|
@ -187,6 +187,7 @@ Show information about a connected device.
|
|||||||
-x, --xml output information as xml plist instead of key/value pairs
|
-x, --xml output information as xml plist instead of key/value pairs
|
||||||
-h, --help prints usage information
|
-h, --help prints usage information
|
||||||
''');
|
''');
|
||||||
|
return null;
|
||||||
});
|
});
|
||||||
final IOSWorkflowTestTarget workflow = IOSWorkflowTestTarget();
|
final IOSWorkflowTestTarget workflow = IOSWorkflowTestTarget();
|
||||||
final ValidationResult result = await workflow.validate();
|
final ValidationResult result = await workflow.validate();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user