alibaba / alibaba/flutter_boost
BoostLifecycleBinding GlobalPageVisibilityObserver页面跳转过程中,没有执行onPagePush、onPagePop
- Dominant language
- Dart
- Stars
- 7.2k
- Forks
- 1.3k
- PR merge metrics
- No merged PRs in 30d
Description
使用的版本
flutter_boost:
git:
url: 'https://github.com/alibaba/flutter_boost.git'
ref: 'v3.0-null-safety-release.2'
在Main.dart设置之后,
void main() {
///添加全局生命周期监听类
PageVisibilityBinding.instance.addGlobalObserver(AppLifecycleObserver());
///这里的CustomFlutterBinding调用务必不可缺少,用于控制Boost状态的resume和pause
MyFlutterBinding();
runApp(MyApp());
}
iOS通过Flutter boost跳转具体flutter页面,跳转正常,但是没有执行onPagePush、onPagePop
@override
void onPagePush(Route route) {
super.onPagePush(route);
Logger.log("AppLifecycleObserver - ${route.settings.name}- onPagePush");
}
@override
void onPagePop(Route route) {
super.onPagePop(route);
Logger.log("AppLifecycleObserver - ${route.settings.name}- onPagePop");
}
没有打印,请问是什么原因呢?怎么处理呢?谢谢。
Contributor guide
No contributing guide indexed for this repository
Research direction
Start with the Main.dart setup shown in the report, including PageVisibilityBinding, AppLifecycleObserver, and CustomFlutterBinding. Reproduce an iOS page transition using the reported flutter_boost v3.0-null-safety-release.2 revision, then trace whether the navigation reaches onPagePush and onPagePop. Done means identifying the lifecycle boundary that prevents the callbacks and documenting or correcting the handling with a reproducible test.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- dart, flutter, ios
- Domain
- mobile
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 28/100