Loader improvements (#6615)
This commit is contained in:
@@ -263,6 +263,7 @@ class HotRunner extends ResidentRunner {
|
||||
return 3;
|
||||
}
|
||||
_loaderShowMessage('Connecting...', progress: 0);
|
||||
_loaderShowExplanation('You can use hot reload to update your app on the fly, without restarting it.');
|
||||
bool devfsResult = await _updateDevFS(
|
||||
progressReporter: (int progress, int max) {
|
||||
if (progress % 10 == 0)
|
||||
@@ -340,6 +341,10 @@ class HotRunner extends ResidentRunner {
|
||||
}
|
||||
}
|
||||
|
||||
void _loaderShowExplanation(String explanation) {
|
||||
currentView.uiIsolate.flutterLoaderShowExplanation(explanation);
|
||||
}
|
||||
|
||||
DevFS _devFS;
|
||||
|
||||
Future<Uri> _initDevFS() {
|
||||
|
||||
@@ -809,6 +809,13 @@ class Isolate extends ServiceObjectOwner {
|
||||
}).catchError((dynamic error) => null);
|
||||
}
|
||||
|
||||
void flutterLoaderShowExplanation(String explanation) {
|
||||
// Invoke loaderShowExplanation; ignore any returned errors.
|
||||
invokeRpcRaw('ext.flutter.loaderShowExplanation', <String, dynamic> {
|
||||
'value': explanation
|
||||
}).catchError((dynamic error) => null);
|
||||
}
|
||||
|
||||
void flutterLoaderSetProgress(double progress) {
|
||||
// Invoke loaderSetProgress; ignore any returned errors.
|
||||
invokeRpcRaw('ext.flutter.loaderSetProgress', <String, dynamic>{
|
||||
|
||||
Reference in New Issue
Block a user