[英]how do I remove fab bottom padding in scaffold
在脚手架中用作 fab 的小部件
默认情况下似乎有填充
见飞镖示例
import 'package:flutter/material.dart';
void main() => runApp(
MaterialApp(
home: Scaffold(
floatingActionButtonLocation:
FloatingActionButtonLocation.centerFloat,
floatingActionButton: Padding(
padding: EdgeInsets.zero,
child: Container(height: 56, color: Colors.red),
),
),
),
);
如何去除红色容器底部的填充物?
当前(蹩脚的)解决方法是
import 'package:flutter/material.dart';
void main() => runApp(
MaterialApp(
home: Scaffold(
floatingActionButtonLocation:
FloatingActionButtonLocation.centerFloat,
+ bottomSheet: Container(height: 16, color: Colors.red),
floatingActionButton: Padding(
padding: EdgeInsets.zero,
child: Container(height: 56, color: Colors.red),
),
),
),
);
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.