We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
有个业务场景,在A-activity内用withContainer=false的方式,开启了两个flutter页面1和2,然后跳转到原生B-activity执行业务,然后再跳转C-activity内开启flutter页面3,这时候需要关闭前面的flutter页面2,使用pop(uniqueId)方式会直接关闭A-activity,也就同时关闭了flutter页面1和2。
看了一下flutter_boost的dart内的源代码是判断container != topContainer的时候直接_removeContainer,而不是remove这个container内的指定page。
请问一下,这个是BUG,还是特意设计如此呢?后续是否会对这个判断进行优化?
No response
Future pop( {String? uniqueId, Object? result, bool onBackPressed = false}) async { if (topContainer == null) return false; BoostContainer? container; if (uniqueId != null) { container = _findContainerByUniqueId(uniqueId); if (container == null) { Logger.error('uniqueId=$uniqueId not found'); return false; } if (container != topContainer) { _completePendingResultIfNeeded(container.pageInfo.uniqueId, result: result); await _removeContainer(container); return true; } } else { container = topContainer; }
Both
3.22.2
5.0.2
Yes
The text was updated successfully, but these errors were encountered:
@fdh19979 目前的boost暂不支持根据uniqueId删除内部路由flutter页面,后续会考虑加入这个功能,敬请期待。
Sorry, something went wrong.
@imcjj 如果暂时不支持,我们修改代码实现了这个功能,支持merge pull requests 吗?
@fdh19979 欢迎提交代码,这边会对PR进行Review
No branches or pull requests
请描述遇到的问题,以及您所期望的正确的结果
有个业务场景,在A-activity内用withContainer=false的方式,开启了两个flutter页面1和2,然后跳转到原生B-activity执行业务,然后再跳转C-activity内开启flutter页面3,这时候需要关闭前面的flutter页面2,使用pop(uniqueId)方式会直接关闭A-activity,也就同时关闭了flutter页面1和2。
看了一下flutter_boost的dart内的源代码是判断container != topContainer的时候直接_removeContainer,而不是remove这个container内的指定page。
请问一下,这个是BUG,还是特意设计如此呢?后续是否会对这个判断进行优化?
请说明如何操作会遇到上述问题
No response
在下面填入关键复现代码
Future pop(
{String? uniqueId, Object? result, bool onBackPressed = false}) async {
if (topContainer == null) return false;
BoostContainer? container;
if (uniqueId != null) {
container = _findContainerByUniqueId(uniqueId);
if (container == null) {
Logger.error('uniqueId=$uniqueId not found');
return false;
}
if (container != topContainer) {
_completePendingResultIfNeeded(container.pageInfo.uniqueId,
result: result);
await _removeContainer(container);
return true;
}
} else {
container = topContainer;
}
复现的平台
Both
Flutter SDK版本
3.22.2
FlutterBoost版本
5.0.2
是否延迟初始化FlutterBoost
Yes
解决方案
The text was updated successfully, but these errors were encountered: