我正在尝试为 FloatingActionButton
的 flutter 构建自定义实现,以替换 Scaffold.floatingActionButton
属性上的标准小部件。
问题是我尝试在该字段中呈现的任何右下边距都有 16 个右下边距,我发现的唯一解决方法是在 flutter 库的 Scaffold 类中将该边距设置为零。
有没有人找到更好的解决方案?
最佳答案
这是一个检查示例代码。
It set 100 margin and you can change as per your requirement.
floatingActionButton: FloatingActionButton(
onPressed: () {
// Add your onPressed code here!
},
child: const Icon(Icons.add_outlined),
backgroundColor:Colors.blue,
tooltip: "Raise Your Concern"),
bottomSheet: Padding(padding: EdgeInsets.only(bottom: 100.0)),
关于dart - Flutter,Scaffold的 float Action 按钮边距,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/49258424/