[英]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.