Set asset directory path only on first hot reload. (#13934)

This commit is contained in:
Alexander Aprelev
2018-01-08 10:05:44 -08:00
committed by GitHub
parent 0a96f96c4f
commit c3366a65e1

View File

@@ -515,9 +515,13 @@ class HotRunner extends ResidentRunner {
int countExpectedReports = 0;
for (FlutterDevice device in flutterDevices) {
// List has one report per Flutter view.
await device.resetAssetDirectory();
if (_runningFromSnapshot) {
// Asset directory has to be set only once when we switch from
// running from snapshot to running from uploaded files.
await device.resetAssetDirectory();
}
// List has one report per Flutter view.
final List<Future<Map<String, dynamic>>> reports = device.reloadSources(
entryPath,
pause: pause