apply partially the upcoming unnecessary_lambdas (#8810)
This commit is contained in:
committed by
GitHub
parent
f9ad230f15
commit
2166ea5b7f
@@ -222,7 +222,7 @@ class _FlutterPlatform extends PlatformPlugin {
|
||||
processObservatoryPort = detectedPort;
|
||||
},
|
||||
startTimeoutTimer: () {
|
||||
new Future<_InitialResult>.delayed(_kTestStartupTimeout, () => timeout.complete());
|
||||
new Future<_InitialResult>.delayed(_kTestStartupTimeout, timeout.complete);
|
||||
},
|
||||
);
|
||||
|
||||
@@ -265,7 +265,7 @@ class _FlutterPlatform extends PlatformPlugin {
|
||||
final Completer<Null> harnessDone = new Completer<Null>();
|
||||
final StreamSubscription<dynamic> harnessToTest = controller.stream.listen(
|
||||
(dynamic event) { testSocket.add(JSON.encode(event)); },
|
||||
onDone: () { harnessDone.complete(); },
|
||||
onDone: harnessDone.complete,
|
||||
onError: (dynamic error, dynamic stack) {
|
||||
// If you reach here, it's unlikely we're going to be able to really handle this well.
|
||||
printError('test harness controller stream experienced an unexpected error\ntest: $testPath\nerror: $error');
|
||||
@@ -285,7 +285,7 @@ class _FlutterPlatform extends PlatformPlugin {
|
||||
assert(encodedEvent is String); // we shouldn't ever get binary messages
|
||||
controller.sink.add(JSON.decode(encodedEvent));
|
||||
},
|
||||
onDone: () { testDone.complete(); },
|
||||
onDone: testDone.complete,
|
||||
onError: (dynamic error, dynamic stack) {
|
||||
// If you reach here, it's unlikely we're going to be able to really handle this well.
|
||||
printError('test socket stream experienced an unexpected error\ntest: $testPath\nerror: $error');
|
||||
@@ -559,9 +559,7 @@ class _FlutterPlatformStreamSinkWrapper<S> implements StreamSink<S> {
|
||||
(List<dynamic> value) {
|
||||
_done.complete();
|
||||
},
|
||||
onError: (dynamic error, StackTrace stack) {
|
||||
_done.completeError(error, stack);
|
||||
},
|
||||
onError: _done.completeError,
|
||||
);
|
||||
return done;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user