【问题标题】:how to flutter bottomsheet from top,just like in this picture如何从顶部摆动底片,就像这张照片一样
【发布时间】:2023-01-31 18:54:47
【问题描述】:

【问题讨论】:

    标签: flutter flutter-dependencies


    【解决方案1】:
    Center(
      child: ElevatedButton(
        child: const Text('showModalBottomSheet'),
        onPressed: () {
          showModalBottomSheet<void>(
            context: context,
            builder: (BuildContext context) {
              return SizedBox(
                height: 200,
                child: Center(
                  child: Column(
                    mainAxisAlignment: MainAxisAlignment.center,
                    mainAxisSize: MainAxisSize.min,
                    children: <Widget>[
                      const Text('Modal BottomSheet'),
                      ElevatedButton(
                        child: const Text('Close BottomSheet'),
                        onPressed: () => Navigator.pop(context),
                      ),
                    ],
                  ),
                ),
              );
            },
          );
        },
      ),
    );
    

    【讨论】:

      猜你喜欢
      • 2018-07-22
      • 2021-05-27
      • 1970-01-01
      • 2012-10-18
      • 2013-02-05
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多