文章目录
一、 AlertDialog
二、 SimpleDialog
三、 showModalBottomSheet
四、 showToast
https://pub.dev/packages/fluttertoast
五、 Flutter 自定义 Dialog
自定义 Dialog 对象,需要继承 Dialog 类,尽管 Dialog 提供了 child 参数可以用来写视图界面,
但是往往会达不到我们想要的效果,因为默认的 Dialog 背景框是满屏的。如果我们想完全定
义界面,就需要重写 build 函数。下面我们通过两个案例给大家演示一下 Dialog 的使用。