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.
By default, the floating action button in flutter is 56 logical pixels height and width. This is the normal size or non-mini size. If you add this property mini with a value true, it will create a smaller floating action button.
FAB containers come in two sizes: 1. Default (56 x 56dp) 2. Mini (40 x 40dp)
wrap your FAB with a FittedBox
inside a Container
or SizedBox
and then change the width and the height of it.
example :
floatingActionButton: Container( height: 100.0, width: 100.0, child: FittedBox( child: FloatingActionButton(onPressed: () {}), ), ),
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With