The code I tried is the following code.
FloatingActionButton(
onPressed: () {},
backgroundColor: Colors.transparent,
elevation: 0,
child: Container(
decoration: const BoxDecoration(
shape: BoxShape.circle,
color: Colors.blue,
),
constraints: const BoxConstraints.expand(),
child: const Icon(
Icons.add,
color: Colors.white,
),
),
)
This image is the code above.
I was able to make it look almost the same, but if there is a better way to do it, please let me know.
In this case, the FloatingActionButton
docs show the shape
property :)
floatingActionButton: FloatingActionButton(
shape: const CircleBorder(),
// ...
),