【问题标题】:Flutter: Replace bottom Dialog with alert dialogFlutter:用警报对话框替换底部对话框
【发布时间】:2020-07-05 21:30:08
【问题描述】:

当我点击底部对话框的一个选项时,我希望底部对话框被一个警告对话框替换,这是我的 onTap 的功能代码:

Navigator.of(context).pushReplacement(MaterialPageRoute(
      builder: (_) => AlertDialog(
        shape: RoundedRectangleBorder(
          borderRadius: BorderRadius.circular(15.0),
        ),
        backgroundColor: AppTheme.backgroundColor,
        title: Text('Select reaction'),
        content: Container(
          height: 100,
          width: 100,
        ),
      ),
    ));

【问题讨论】:

    标签: ios flutter dart flutter-dialog flutter-design


    【解决方案1】:

    找到了!我忘记删除一行代码,现在完美运行,

    我也替换

    Navigator.of(context).pushReplacement(.....
    

    showDialog(....
    

    【讨论】:

      猜你喜欢
      • 2013-04-17
      • 1970-01-01
      • 2020-10-01
      • 1970-01-01
      • 2021-01-17
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多