我尝试的代码是以下代码。
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,
),
),
)
Run Code Online (Sandbox Code Playgroud)
这张图就是上面的代码。
我能够使它看起来几乎相同,但如果有更好的方法,请告诉我。