删除Flutter Container> FlatButton中的填充
我正在寻找删除FlatButton的默认边距,但似乎无法设置/覆盖它。
Column(children: <Widget>[ Container(
children: [
FractionallySizedBox(
widthFactor: 0.6,
child: FlatButton(
color: Color(0xFF00A0BE),
textColor: Color(0xFFFFFFFF),
child: Text('LOGIN', style: TextStyle(letterSpacing: 4.0)),
shape: RoundedRectangleBorder(side: BorderSide.none)))),
Container(
margin: const EdgeInsets.only(top: 0.0),
child: FractionallySizedBox(
widthFactor: 0.6,
child: FlatButton(
color: Color(0xFF00A0BE),
textColor: Color(0xFF525252),
child: Text('SIGN UP',
style: TextStyle(
fontFamily: 'Lato',
fontSize: 12.0,
color: Color(0xFF525252),
letterSpacing: 2.0)))))
])
我遇到过类似的事情ButtonTheme
,甚至debugDumpRenderTree()
还无法正确实现。
回答:
FlatButton(materialTapTargetSize: MaterialTapTargetSize.shrinkWrap,)
以上是 删除Flutter Container> FlatButton中的填充 的全部内容, 来源链接: utcz.com/qa/411387.html