當我按下浮動操作按鈕時,我想生成一個容器或一個襟翼(我不知道這個詞),一切都在螢屏上解釋,非常感謝!

我希望這個選項卡在我按下按鈕時從底部到頂部生成,然后在我再次按下按鈕時從頂部到底部消失
uj5u.com熱心網友回復:
嘗試這個:
floatingActionButton: IconButton(
onPressed: () {
showModalBottomSheet(
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(10.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);
},
icon: Icon(Icons.add),
),
轉載請註明出處,本文鏈接:https://www.uj5u.com/qiye/527890.html
標籤:扑镖颤振布局
上一篇:Flutter-將地圖添加到地圖
