Im-Kevin / cool_ui

用flutter实现一些我认为好看的UI控件,有Popover,仿Weui的Toast,自定义键盘
Apache License 2.0
460 stars 74 forks source link

popover,弹窗收起后,需要更新下原来的页面(setState),怎么做? #57

Closed shawn736 closed 3 years ago

shawn736 commented 4 years ago

你好,收起弹窗后,需要更新下原来的页面,执行setState,应该怎么做?

issue-label-bot[bot] commented 4 years ago

Issue-Label Bot is automatically applying the label bug to this issue, with a confidence of 0.88. Please mark this comment with :thumbsup: or :thumbsdown: to give our bot feedback!

Links: app homepage, dashboard and code for this bot.

Im-Kevin commented 4 years ago

你应该在onTap做这些

shawn736 commented 4 years ago

你应该在onTap做这些

onTap? 不明白,CupertinoPopoverButton的按钮点击事件,这个我理解是点击按钮,显示弹窗前的事件,问题是怎么处理弹窗收起的情况?

Im-Kevin commented 4 years ago

点击的时候你可以自己决定是否关闭

shawn736 commented 4 years ago

点击的时候你可以自己决定是否关闭

是指CupertinoPopoverMenuItem的onTap?我们设计的弹窗UI比较复杂,这个item的样式不符合设计需求,所以没有用到,CupertinoPopoverMenuList的子元素是自定义的

shawn736 commented 4 years ago

使用场景:不是只点选一个菜单项,就立马收起弹窗,我们的弹窗里会进行多个参数配置,选择好后,用户点击弹窗外的区域,才会收起弹窗,此时希望能更新下原来的页面。

Im-Kevin commented 4 years ago

点弹窗外的话我这里是没有事件的

Im-Kevin commented 4 years ago

而且,为什么是点击弹窗外,我觉得这个设计有点不合理,应该由一个按钮让用户点击才合适

shawn736 commented 4 years ago

而且,为什么是点击弹窗外,我觉得这个设计有点不合理,应该由一个按钮让用户点击才合适

谢谢,只好试试调整设计方案了