Move to real generic method syntax (#7235)
This commit is contained in:
@@ -196,7 +196,7 @@ class FlutterDriver {
|
||||
// option, then the VM service extension is not registered yet. Wait for
|
||||
// it to be registered.
|
||||
Future<dynamic> whenResumed = resumeLeniently();
|
||||
Future<dynamic> whenServiceExtensionReady = Future.any/*<dynamic>*/(<Future<dynamic>>[
|
||||
Future<dynamic> whenServiceExtensionReady = Future.any<dynamic>(<Future<dynamic>>[
|
||||
waitForServiceExtension(),
|
||||
// We will never receive the extension event if the user does not
|
||||
// register it. If that happens time out.
|
||||
@@ -452,9 +452,9 @@ class FlutterDriver {
|
||||
/// With frame sync disabled, its the responsibility of the test author to
|
||||
/// ensure that no action is performed while the app is undergoing a
|
||||
/// transition to avoid flakiness.
|
||||
Future<dynamic/*=T*/> runUnsynchronized/*<T>*/(Future<dynamic/*=T*/> action()) async {
|
||||
Future<T> runUnsynchronized<T>(Future<T> action()) async {
|
||||
await _sendCommand(new SetFrameSync(false));
|
||||
dynamic/*=T*/ result;
|
||||
T result;
|
||||
try {
|
||||
result = await action();
|
||||
} finally {
|
||||
|
||||
@@ -160,7 +160,7 @@ class TimelineSummary {
|
||||
if (events.length == 0)
|
||||
return null;
|
||||
|
||||
int total = events.fold/*<int>*/(0, (int t, TimedEvent e) => t + e.duration.inMilliseconds);
|
||||
int total = events.fold<int>(0, (int t, TimedEvent e) => t + e.duration.inMilliseconds);
|
||||
return total / events.length;
|
||||
}
|
||||
|
||||
@@ -169,7 +169,7 @@ class TimelineSummary {
|
||||
return null;
|
||||
|
||||
return events
|
||||
.map/*<double>*/((TimedEvent e) => e.duration.inMilliseconds.toDouble())
|
||||
.map<double>((TimedEvent e) => e.duration.inMilliseconds.toDouble())
|
||||
.reduce((double a, double b) => math.max(a, b));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user