我最后定位了一个FloaatingActionButton(我希望有一个右下方的对齐)但不幸的是它离右边太远了,底部的一部分被边缘切断了
Row(
mainAxisAlignment: MainAxisAlignment.end,
children: <Widget>[
FloatingActionButton(
onPressed: displayDialog,
child: Icon(
Icons.queue_music,
),
foregroundColor: Colors.white,
backgroundColor: Colors.red[900],
)
],
),
如何添加一些间距并避免这种重叠?
在FAB右边有一些边距之后,在窗口小部件中添加容器作为Row的子节点
Row(
mainAxisAlignment: MainAxisAlignment.end,
children: <Widget>[
FloatingActionButton(
onPressed: displayDialog,
child: Icon(
Icons.queue_music,
),
foregroundColor: Colors.white,
backgroundColor: Colors.red[900],
),
Container(
margin: EdgeInsets.only(right: someMargin),
),
],
),