flutter_boost
flutter_boost copied to clipboard
flutter methodChannel问题
flutter端
- 根据flutterboostDemo,flutterboost注册widget(A)
- classA中声明methodChannel
- init方法初始化methodChannel
- disposal释放methodChannel
iOS端 APPDelegate初始化flutterboost。
- 根控制器是tabBarController,子控制器是A,B,C,D
- 存在一个FLBFlutterViewContainer作为tabbar的childController(D)
- 使用B,push一个新的FLBFlutterViewContainer(F)。初始化流程:1、init(setname)2、注册methodChannel 3、push(F)
- pop (F)
- 再次push一个新的(F)
问题: 再次进入页面F flutter报错,methodChannel为空
**Flutter Boost Version 1.12.13 **Target Platform:iOS **Target OS version/browser:13 **Devices: 模拟器
- 使用B,push一个新的FLBFlutterViewContainer(F)。初始化流程:1、init(setname)2、注册methodChannel 3、push(F)
这里如何注册的methodChannel? 全局使用一个methodChannel试试 是不是 首次生成的methodChannel被你在第二步注册的methodChannel覆盖掉了,代码贴出来看看
flutter端
- 根据flutterboostDemo,flutterboost注册widget(A)
- classA中声明methodChannel
- init方法初始化methodChannel
- disposal释放methodChannel
iOS端 APPDelegate初始化flutterboost。
- 根控制器是tabBarController,子控制器是A,B,C,D
- 存在一个FLBFlutterViewContainer作为tabbar的childController(D)
- 使用B,push一个新的FLBFlutterViewContainer(F)。初始化流程:1、init(setname)2、注册methodChannel 3、push(F)
- pop (F)
- 再次push一个新的(F)
问题: 再次进入页面F flutter报错,methodChannel为空
**Flutter Boost Version 1.12.13 **Target Platform:iOS **Target OS version/browser:13 **Devices: 模拟器
每次进入flbvc init后注册channel 并监听然后push,pop后销毁看起来没问题
methodChannel的binaryMessenger挂载到哪里了