restartApp method Null safety

Future<bool?> restartApp(
  1. {Duration? timeout}
)

Implementation

Future<bool?> restartApp({Duration? timeout}) async {
  timeout ??= const Duration(seconds: 60);
  await _closeDriver(timeout: timeout);
  final result = await _flutterRunProcessHandler?.restart(
    timeout: timeout,
  );

  _driver = await FlutterDriver.connect(
    dartVmServiceUrl: _flutterRunProcessHandler?.currentObservatoryUri,
  );

  return result;
}