如何将大小设置为FloatingActionButton [英] How to set size to FloatingActionButton
本文介绍了如何将大小设置为FloatingActionButton的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我试图在Flutter中将大小设置为 FloatingActionButton
,我想设置 width
/ height
更大的按钮,我一直在寻找一个圆形的按钮,但我唯一得到的就是这个按钮,因此,我开始使用它,但是我需要更大一些.
I'm trying to set a size to a FloatingActionButton
in flutter, I wanna set width
/height
, I mean, make the button bigger, I was looking for a circular button, but the only one that I got was this one, so, I started to work with this, but I need it a little bigger.
推荐答案
使用容器
,您可以在其中指定 width
和 height
使用 RawMaterialButton
,如下所示:
Use a Container
where you can specify width
and height
, then use a RawMaterialButton
, like this:
myFabButton = Container(
width: 200.0,
height: 200.0,
child: new RawMaterialButton(
shape: new CircleBorder(),
elevation: 0.0,
child: Icon(
Icons.favorite,
color: Colors.blue,
),
onPressed: (){},
);
这篇关于如何将大小设置为FloatingActionButton的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文