Skip to content

popUntil在iOS端无法关闭多个flutter container中间的native页面 #2250

@niuyongchang

Description

@niuyongchang

版本: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侧进行额外的实现?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions