showModalBottomSheet(
isScrollControlled: true,
constraints: BoxConstraints(
maxHeight: MediaQuery.of(context).size.height / 2.5),
shape: const RoundedRectangleBorder(
borderRadius: BorderRadius.only(
topLeft: Radius.circular(40),
topRight: Radius.circular(40))),
backgroundColor: Colors.grey[100],
context: context,
builder: ((BuildContext context) {
return Wrap(children: [
Row(children: [
ElevatedButton(
onPressed: () {}, child: const Text('Button')),
ElevatedButton(
onPressed: () {}, child: const Text('Button')),
ElevatedButton(
onPressed: () {}, child: const Text('Button')),
ElevatedButton(
onPressed: () {}, child: const Text('Button')),
ElevatedButton(
onPressed: () {}, child: const Text('Button')),
ElevatedButton(
onPressed: () {}, child: const Text('Button')),
ElevatedButton(
onPressed: () {}, child: const Text('Button')),
ElevatedButton(
onPressed: () {}, child: const Text('Button')),
ElevatedButton(
onPressed: () {}, child: const Text('Button')),
ElevatedButton(
onPressed: () {}, child: const Text('Button')),
ElevatedButton(
onPressed: () {}, child: const Text('Button')),
])
]);
}));
我在 showmodalbottomsheet 函式中連續有許多提升的按鈕。我想在底部顯示它們。但是按鈕并沒有溢位到第二行。我使用了 Wrap 小部件,但它沒有用。有人可以幫助我嗎?
轉載請註明出處,本文鏈接:https://www.uj5u.com/qukuanlian/512879.html
標籤:扑镖颤振布局
上一篇:飛鏢中優化的冒泡排序
