📜  如何在构建 Flutter 后显示对话框 - 无论代码示例

📅  最后修改于: 2022-03-11 14:59:58.633000             🧑  作者: Mango

代码示例2
class XxxxxWidget extends StatelessWidget {

@override
Widget build(BuildContext context) {
// [NG]We want to show dialog on Container widget.

 Future.delayed(Duration.zero, () => showMyDialog(context)); // import 'dart:async';
 return Container(
  child: FlatButton(.... //same as question