Set the initial route before launching the Dart app (#3795)

See https://github.com/flutter/flutter/issues/10813
This commit is contained in:
Jason Simmons 2017-06-19 15:25:47 -07:00 committed by GitHub
parent 3c049219e1
commit 979f8a63ea

View File

@ -265,10 +265,10 @@ public final class FlutterActivityDelegate
// was specified.
appBundlePath = FlutterMain.findAppBundlePath(activity.getApplicationContext());
}
flutterView.runFromBundle(appBundlePath, intent.getStringExtra("snapshot"));
if (route != null) {
flutterView.pushRoute(route);
flutterView.setInitialRoute(route);
}
flutterView.runFromBundle(appBundlePath, intent.getStringExtra("snapshot"));
return true;
}