Commit fb802ed1 authored by zjq's avatar zjq Committed by justin

Git pick 73ccc45c

parent c67924c5
...@@ -89,15 +89,31 @@ class FlutterBoost { ...@@ -89,15 +89,31 @@ class FlutterBoost {
}); });
} }
static TransitionBuilder init({ static ContainerManagerState get containerManager =>
TransitionBuilder builder, _instance.containerManagerKey.currentState;
PrePushRoute prePush,
PostPushRoute postPush, static void onPageStart() {
}) { WidgetsBinding.instance.addPostFrameCallback((_) {
singleton.channel.invokeMethod<Map>('pageOnStart').then((Map pageInfo) {
if (pageInfo == null || pageInfo.isEmpty) return;
if (pageInfo.containsKey("name") &&
pageInfo.containsKey("params") &&
pageInfo.containsKey("uniqueId")) {
ContainerCoordinator.singleton.nativeContainerDidShow(
pageInfo["name"], pageInfo["params"], pageInfo["uniqueId"]);
}
});
});
}
static TransitionBuilder init(
{TransitionBuilder builder,
PrePushRoute prePush,
PostPushRoute postPush}) {
if (Platform.isAndroid) { if (Platform.isAndroid) {
onPageStart(); onPageStart();
} else if (Platform.isIOS) { } else if (Platform.isIOS) {
// TODO(AlexVincent525): 未解之谜
assert(() { assert(() {
() async { () async {
onPageStart(); onPageStart();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment