alibaba / alibaba/flutter_boost
popUntil在iOS端无法关闭多个flutter container中间的native页面
- Dominant language
- Dart
- Stars
- 7.2k
- Forks
- 1.3k
- PR merge metrics
- No merged PRs in 30d
Description
版本:v4.6.5
假设有native a -> flutter b -> native c -> flutter d 四个页面,现在在flutter d页面通过popUntil('b')回到flutter b页面,发现native c页面无法关闭,只执行了一个flutter d的pop事件。
阅读源码发现,popUntil的逻辑行为确实是这样:
popUntil是根据目标route,从containers集合中来查找目标route对应的container,从而进行连续的pop操作来实现的。
然而从flutter b跳转native c时,并不会创建container,也就是说,containers集合中并不会包含native c,所以container的数量与页面数量不一致(此处只考虑每个container中只有一个flutter页面的情况),所以pop次数是缺少的。
实际测试发生,哪怕只是想要从flutter d回到native c都无法实现,也是因为containers中根本无法找到native c页面的路由。
请问下是在实现时没有考虑这种情况吗?还是我需要在native侧进行额外的实现?
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by tracing popUntil and its lookup in the containers collection, then reproduce the native a → Flutter b → native c → Flutter d flow on iOS. Done should mean popUntil can close the intervening native page and return from Flutter d to Flutter b, or clearly document the required native-side integration if that is unsupported.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- dart, ios
- Domain
- mobile-dev
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100