mirror of
https://github.com/flutter/flutter.git
synced 2025-06-03 00:51:18 +00:00
Call refreshViews after every restart (#5479)
This commit is contained in:
parent
e683cb2157
commit
83ab5f8345
@ -70,7 +70,9 @@ class RunCommand extends RunCommandBase {
|
||||
|
||||
// Option to write the pid to a file.
|
||||
argParser.addOption('pid-file',
|
||||
help: 'Specify a file to write the process id to.');
|
||||
help: 'Specify a file to write the process id to.'
|
||||
'You can send SIGUSR1 to trigger a hot reload '
|
||||
'and SIGUSR2 to trigger a full restart.');
|
||||
|
||||
|
||||
// Hidden option to enable a benchmarking mode. This will run the given
|
||||
|
@ -47,10 +47,16 @@ abstract class ResidentRunner {
|
||||
}
|
||||
|
||||
Future<Null> _debugDumpApp() async {
|
||||
if (vmService != null)
|
||||
await vmService.vm.refreshViews();
|
||||
|
||||
await currentView.uiIsolate.flutterDebugDumpApp();
|
||||
}
|
||||
|
||||
Future<Null> _debugDumpRenderTree() async {
|
||||
if (vmService != null)
|
||||
await vmService.vm.refreshViews();
|
||||
|
||||
await currentView.uiIsolate.flutterDebugDumpRenderTree();
|
||||
}
|
||||
|
||||
|
@ -886,6 +886,7 @@ class FlutterView extends ServiceObject {
|
||||
packagesPath,
|
||||
assetsDirectoryPath);
|
||||
await completer.future;
|
||||
await owner.vm.refreshViews();
|
||||
await subscription.cancel();
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user