Flutter 模式对话框

本文介绍了如何在Flutter中动态地显示Modal Bottom Sheet,解决状态更新问题。作者分享了在点击编辑任务时重用Modal Bottom Sheet的方法,并提供了解决方案,将Modal Bottom Sheet的显示逻辑独立为一个函数,从而在不同场景下方便调用。
摘要由CSDN通过智能技术生成

[外链图片转存失败,源站可能有防盗链机制,建议将图片保存下来直接上传(img-bekJuzpf-1635086456514)(https://ducafecat.tech/2021/10/25/translation/how-to-display-the-modal-bottom-sheet-programmatically-in-flutter/2021-10-24-22-22-54.png)]

原文

https://betterprogramming.pub/how-to-display-the-modal-bottom-sheet-programmatically-in-flutter-d1fad5fdd462

代码

https://github.com/macro6461/flutter_to_do

参考

  • https://stackoverflow.com/questions/69471054/unable-to-reflect-updated-parent-state-in-showmodalbottomsheet
  • https://stackoverflow.com/questions/69486752/trigger-floatingactionbutton-onpressed-without-pressing-the-button
  • https://stackoverflow.com/users/1647098/eimmer

正文

如果你是从我以前的帖子来的,你看到我启动了我的待办事项应用程序,解决了我状态更新时不能用 showModalBottomSheet

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值