flutter 如何从上到下拍打床单,就像这张照片

ibps3vxo  于 2023-02-05  发布在  Flutter
关注(0)|答案(1)|浏览(133)
fykwrbwg

fykwrbwg1#

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),
                  ),
                ],
              ),
            ),
          );
        },
      );
    },
  ),
);

相关问题