せいゆ*_*いゆう 2 material-design material-ui flutter
我尝试的代码是以下代码。
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)
这张图就是上面的代码。
我能够使它看起来几乎相同,但如果有更好的方法,请告诉我。
dan*_*guy 10
在这种情况下,FloatingActionButton文档显示了该shape属性:)
floatingActionButton: FloatingActionButton(
shape: const CircleBorder(),
// ...
),
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
653 次 |
| 最近记录: |