【发布时间】:2022-11-04 20:10:25
【问题描述】:
【问题讨论】:
-
使用
bottom sheet。 -
如果可能的话,用动画
-
是的,bootm 工作表具有从底部开始的默认动画开口。
标签: flutter dart flutter-layout
【问题讨论】:
bottom sheet。
标签: flutter dart flutter-layout
尝试这个:
InkWell(
onTap: () async {
showModalBottomSheet(
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(16.0),
),
backgroundColor: Colors.white,
builder: (BuildContext context) {
return Column(
children: [
ElevatedButton(
onPressed: () {
Navigator.pop(context);
},
child: Text('Botton 1')),
SizedBox(
height: 20,
),
ElevatedButton(
onPressed: () {}, child: Text('Botton 2'))
],
);
},
context: context);
},
child: Text('show'),
),
【讨论】: