[FlutterDriver] minor nullability fixes (#94584)
This commit is contained in:
parent
5ddc00cc03
commit
4e2c77d491
@ -366,11 +366,12 @@ class FlutterDriverExtension with DeserializeFinderFactory, CreateFinderFactory,
|
|||||||
final Command command = deserializeCommand(params, this);
|
final Command command = deserializeCommand(params, this);
|
||||||
assert(WidgetsBinding.instance!.isRootWidgetAttached || !command.requiresRootWidgetAttached,
|
assert(WidgetsBinding.instance!.isRootWidgetAttached || !command.requiresRootWidgetAttached,
|
||||||
'No root widget is attached; have you remembered to call runApp()?');
|
'No root widget is attached; have you remembered to call runApp()?');
|
||||||
Future<Result?> responseFuture = handleCommand(command, _prober, this);
|
Future<Result> responseFuture = handleCommand(command, _prober, this);
|
||||||
if (command.timeout != null)
|
if (command.timeout != null) {
|
||||||
responseFuture = responseFuture.timeout(command.timeout ?? Duration.zero);
|
responseFuture = responseFuture.timeout(command.timeout!);
|
||||||
final Result? response = await responseFuture;
|
}
|
||||||
return _makeResponse(response?.toJson());
|
final Result response = await responseFuture;
|
||||||
|
return _makeResponse(response.toJson());
|
||||||
} on TimeoutException catch (error, stackTrace) {
|
} on TimeoutException catch (error, stackTrace) {
|
||||||
final String message = 'Timeout while executing $commandKind: $error\n$stackTrace';
|
final String message = 'Timeout while executing $commandKind: $error\n$stackTrace';
|
||||||
_log(message);
|
_log(message);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user