FittedBox
和
BoxFit.fitWidth
Icon
缩小到分配的数量。如果我包一个
IconButton
在一个
它什么也不做!
我如何调整我的尺寸
图标按钮
这是我的密码
return new Scaffold(
body: Column(children: [
Row(children: [
Expanded(
flex: 5,
child: Container(
child: Text('Icon button ->'),
color: Colors.green,
)),
Expanded(
flex: 1,
child: FittedBox(
fit: BoxFit.fitWidth,
child: IconButton(
icon: Icon(
Icons.radio,
size: 200.0,
),
onPressed: () => print('x'),
)))
]),
Row(children: [
Expanded(
flex: 5,
child: Container(
child: Text('just an Icon ->'),
color: Colors.green,
)),
Expanded(
flex: 1,
child: FittedBox(
fit: BoxFit.fitWidth,
child: Icon(
Icons.radio,
size: 200.0,
)))
])
]));