alibaba / alibaba/flutter_boost
[Bug]: 高版本的Flutter SDK下AppLifecycleState枚举有变动导致FlutterBoost生命周期通知无法匹配
- Dominant language
- Dart
- Stars
- 7.2k
- Forks
- 1.3k
- PR merge metrics
- No merged PRs in 30d
Description
### 请描述遇到的问题,以及您所期望的正确的结果
高版本Flutter SDK(3.19.5)中,AppLifecycleState.resumed的index变成1了,AppLifecycleState.resumed的index变成4了,而FlutterBoost中判断生命周期的接收数值还是0和2。最终导致匹配不了目标生命周期。
https://github.com/flutter/flutter/blob/master/engine/src/flutter/lib/ui/platform_dispatcher.dart
https://github.com/alibaba/flutter_boost/blob/main/lib/src/flutter_boost_app.dart
### 请说明如何操作会遇到上述问题
升级FlutterSDK版本到3.19.5
### 在下面填入关键复现代码
https://github.com/flutter/flutter/blob/master/engine/src/flutter/lib/ui/platform_dispatcher.dart
https://github.com/alibaba/flutter_boost/blob/main/lib/src/flutter_boost_app.dart
### 复现的平台
Both
### Flutter SDK版本
3.19.5
### FlutterBoost版本
4.6.5
### 是否延迟初始化FlutterBoost
No
### 解决方案
修改FLutterBoost中_addAppLifecycleStateEventListener方法里的生命周期枚举判断条件
Contributor guide
No contributing guide indexed for this repository
Research direction
Start in lib/src/flutter_boost_app.dart, focusing on _addAppLifecycleStateEventListener and compare its lifecycle enum checks with Flutter SDK 3.19.5 and the linked platform_dispatcher.dart definition. The issue is done when FlutterBoost lifecycle notifications correctly match the updated AppLifecycleState values on both platforms.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- dart, flutter
- Domain
- mobile-dev
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 45/100