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
标题格式:[BUG]: 问题简介
内容需包含:
1、BUG 描述
BrnPopupListWindow.showPopListWindow 点击事件,路由无法跳转 BrnPopupListWindow.showPopListWindow(context, _popWindowKey, offset: 10, data: ["新增个人担保人", "新增企业担保人"], onItemClick: (index, item) { if(index == 0){ print('1111111'); Navigator.push( context, MaterialPageRoute(builder: (context) => GuarantorPersonPage()), ); Get.toNamed(AppPages.guarantorPerson); } else { print('222222'); Get.toNamed(AppPages.guarantorCompany); } },); }) 我用了两个路由才能实现跳转,我用了一个原生+getx路由,才能跳转过去。
BrnPopupListWindow.showPopListWindow(context, _popWindowKey, offset: 10, data: ["新增个人担保人", "新增企业担保人"], onItemClick: (index, item) { if(index == 0){ print('1111111'); Navigator.push( context, MaterialPageRoute(builder: (context) => GuarantorPersonPage()), ); Get.toNamed(AppPages.guarantorPerson); } else { print('222222'); Get.toNamed(AppPages.guarantorCompany); } },); })
2、复现步骤 BrnPopupListWindow.showPopListWindow
3、期望行为 希望只要是个路由就能跳转过去
4、运行环境 Flutter 1.22.5 • channel stable Engine • revision ae90085a84 Tools • Dart 2.10.4
5、附加信息
包括视频、图片等补充信息
The text was updated successfully, but these errors were encountered:
经过验证,可复现这个问题。 原因是: onItemClick 点击触发后,内部存在 pop逻辑,使浮层消失。若 onItemClick 中存在页面路由,则会将页面路由 pop 掉。
近期会发布小版本修复该问题~
临时解决方案有两个个: 1、在 onDismiss 中添加路由逻辑,类似:
BrnPopupListWindow.showPopListWindow( context, aaaaa, offset: 10, data: ["新增个人担保人", "新增企业担保人"], onDismiss: (){ Navigator.push(context, route); } );
2、可 onItemClick 返回 true 拦截点击事件。自定义点击行为,类似:
BrnPopupListWindow.showPopListWindow( context, _popWindowKey, offset: 10, data: ["新增个人担保人", "新增企业担保人"], onItemClick: (index, item) { if (index == 0) { print('1111111'); /// 关闭 浮层 Navigator.pop(context); /// 页面路由 Navigator.push(context, route); return true; /// 返回true 表示拦截该点击事件 } else { print('222222'); } }, );
Sorry, something went wrong.
关于 popWindow 路由已做优化 https://github.com/LianjiaTech/bruno/pull/63,可再试下
No branches or pull requests
问题提交
标题格式:[BUG]: 问题简介
内容需包含:
1、BUG 描述
BrnPopupListWindow.showPopListWindow
点击事件,路由无法跳转
BrnPopupListWindow.showPopListWindow(context, _popWindowKey, offset: 10, data: ["新增个人担保人", "新增企业担保人"], onItemClick: (index, item) { if(index == 0){ print('1111111'); Navigator.push( context, MaterialPageRoute(builder: (context) => GuarantorPersonPage()), ); Get.toNamed(AppPages.guarantorPerson); } else { print('222222'); Get.toNamed(AppPages.guarantorCompany); } },); })
我用了两个路由才能实现跳转,我用了一个原生+getx路由,才能跳转过去。
2、复现步骤
BrnPopupListWindow.showPopListWindow
3、期望行为
希望只要是个路由就能跳转过去
4、运行环境
Flutter 1.22.5 • channel stable
Engine • revision ae90085a84
Tools • Dart 2.10.4
Android oppo R17
Mac
5、附加信息
包括视频、图片等补充信息
The text was updated successfully, but these errors were encountered: