我正在尝试将大小设置为 flutter 中的 FloatingActionButton
,我想设置 width
/height
,我的意思是,使按钮更大,我一直在寻找一个圆形按钮,但我得到的只有这个,所以,我开始使用它,但我需要它更大一点。
最佳答案
在 Container
或 SizedBox
中用 FittedBox
包装您的 FAB,然后更改它的宽度和高度。
example :
floatingActionButton: Container(
height: 100.0,
width: 100.0,
child: FittedBox(
child: FloatingActionButton(onPressed: () {}),
),
),
https://stackoverflow.com/questions/52786652/