mirror of
https://github.com/flutter/flutter.git
synced 2025-06-03 00:51:18 +00:00
Make runner
non-nullable as it always is. (#159156)
This commit is contained in:
parent
1686fa7eb4
commit
1fdcb757fd
@ -372,7 +372,7 @@ known, it can be explicitly provided to attach via the command-line, e.g.
|
||||
} on Exception catch (error) {
|
||||
throwToolExit(error.toString());
|
||||
}
|
||||
result = await app.runner!.waitForAppToFinish();
|
||||
result = await app.runner.waitForAppToFinish();
|
||||
return;
|
||||
}
|
||||
while (true) {
|
||||
|
@ -902,7 +902,7 @@ class AppDomain extends Domain {
|
||||
if (app == null) {
|
||||
throw DaemonException("app '$appId' not found");
|
||||
}
|
||||
final FlutterDevice device = app.runner!.flutterDevices.first;
|
||||
final FlutterDevice device = app.runner.flutterDevices.first;
|
||||
final List<FlutterView> views = await device.vmService!.getFlutterViews();
|
||||
final Map<String, Object?>? result = await device
|
||||
.vmService!
|
||||
@ -1550,20 +1550,24 @@ class NotifyingLogger extends DelegatingLogger {
|
||||
|
||||
/// A running application, started by this daemon.
|
||||
class AppInstance {
|
||||
AppInstance(this.id, { this.runner, this.logToStdout = false, required AppRunLogger logger })
|
||||
: _logger = logger;
|
||||
AppInstance(
|
||||
this.id, {
|
||||
required this.runner,
|
||||
this.logToStdout = false,
|
||||
required AppRunLogger logger,
|
||||
}) : _logger = logger;
|
||||
|
||||
final String id;
|
||||
final ResidentRunner? runner;
|
||||
final ResidentRunner runner;
|
||||
final bool logToStdout;
|
||||
final AppRunLogger _logger;
|
||||
|
||||
Future<OperationResult> restart({ bool fullRestart = false, bool pause = false, String? reason }) {
|
||||
return runner!.restart(fullRestart: fullRestart, pause: pause, reason: reason);
|
||||
return runner.restart(fullRestart: fullRestart, pause: pause, reason: reason);
|
||||
}
|
||||
|
||||
Future<void> stop() => runner!.exit();
|
||||
Future<void> detach() => runner!.detach();
|
||||
Future<void> stop() => runner.exit();
|
||||
Future<void> detach() => runner.detach();
|
||||
|
||||
void closeLogger() {
|
||||
_logger.close();
|
||||
|
@ -771,7 +771,7 @@ class RunCommand extends RunCommandBase {
|
||||
throwToolExit(error.toString());
|
||||
}
|
||||
final DateTime appStartedTime = globals.systemClock.now();
|
||||
final int result = await app.runner!.waitForAppToFinish();
|
||||
final int result = await app.runner.waitForAppToFinish();
|
||||
if (result != 0) {
|
||||
throwToolExit(null, exitCode: result);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user