Closed xieqi520 closed 2 years ago
以iOS 举例:
(void)dStack:(nonnull DStack )stack pushWithNode:(nonnull DStackNode )node { BaseViewController didPushController = nil; UINavigationController navi = [self dStack:stack navigationControllerForNode:node]; if ([node.route isEqualToString:@"beeto://native.test1"]) { didPushController = [[Test1ViewController alloc] init]; } else if ([node.route isEqualToString:@"beeto://native.test2"]) { didPushController = [[Test2ViewController alloc] init]; }
didPushController.params = node.params[@"object"]; [navi pushViewController:didPushController animated:node.animated]; }
flutter侧发送路由过来后,需要原生自己实现判断,Android、iOS demo中都有写,请先看下demo
你好,这个写了的,按照你们demo写的,这个是xcode运行可以跳转,但是flutter运行不可以跳转,这个如果只是普通的传值,没有跳转操作的话,这个该怎么传值呢
混合栈在页面打开关闭的时候,可以带着参数。只是普通的传值的话,这种情况不属于混合栈的范畴,你可以通过自定义channel来实现native和flutter之间的通信。
这个再原生的项目里面加入,flutter模块,flutter运行,不跳转原生,但是原生运行的可以跳转原生,返回root的不能返回最初的那个page1,只能返回page2