alibaba / alibaba/flutter_boost
[Bug]: Android在内存重启时,无法正常恢复页面堆栈
- Dominant language
- Dart
- Stars
- 7.2k
- Forks
- 1.3k
- PR merge metrics
- No merged PRs in 30d
Description
### 请描述遇到的问题,以及您所期望的正确的结果
如果全都以`withContainer=true`的方式打开新页面,在内存重启后,操作push、pop,看起来页面堆栈是正常的,但其实并没有真的恢复。
内存重启后,app回到前台,顶层的`FlutterBoostActivity`重建后,Flutter页面恢复,此时`FlutterBoost`的堆栈管理中只存在当前这一个页面,并没有前面页面的堆栈记录。如果往前返回,看似能够回到上个Flutter页面,但其实是上个`FlutterBoostActivity`重建,然后根据Native的Intent中的数据进行了重新加载。此时的`FlutterBoost`中记录的堆栈,仍然只剩当前这个页面。
### 请说明如何操作会遇到上述问题
_No response_
### 在下面填入关键复现代码
```
```
### 复现的平台
Android
### Flutter SDK版本
3.22.2
### FlutterBoost版本
dev/exp
### 是否延迟初始化FlutterBoost
No
### 解决方案
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by reproducing the Android memory-restart flow described for FlutterBoostActivity when pages are opened with withContainer=true. Inspect how FlutterBoost restores its page stack after the activity rebuilds, then verify that push and pop preserve the complete stack rather than reloading pages from the native Intent data.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- android, dart, flutter
- Domain
- mobile
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100