Cause: The project uses flutter_boost , I found the whole VC flutter directly to pop out when skidding, demo the code jump to flutter in the way of a new page is opened using openPage, so there is no problem, but we do not want every a new flutter use openPage open (every time a new one is a waste of VC performance, and second, the situation will appear flashing), after a few days continue to verify the transformation, it can finally be phased solution to this problem, in this to be a record.
specific plan
Look at the transformation of the increase of the process:
The following is a specific point increase
flutter aspects
1, adds a navigation monitor each time the flutter canPop value of the page to be notified when the native push and pop.
2, adds a native callback method, will notify the native interface of the current page can pop flutter when Native call.
iOS aspects
1, in a method for increasing the FLBPlatform (will be called upon receipt of the corresponding flutter method):
- (void)flutterCanPop:(BOOL)canpop;
复制代码
2, in showFlutterView FLBFlutterViewController (corresponding to the viewWillAppear) method to obtain a method canPop flutter increased.
3, corresponding to the increase in the received class flutterCanPopNavigationService_flutterCanPop
During Demo
That there will flutter flutter jump page mode by the openPage mode to Router mode.
Revised results
The transformation of the current code has been submitted to the flutter_boost ~~ hope to help you ~
Reproduced in: https: //juejin.im/post/5cf8e4b96fb9a07ed440f1d8