如何在Flutter 中调整图标按钮的大小(高度和宽度)?它似乎采用默认的宽度和高度.没有Height或Width属性.
new IconButton(
padding: new EdgeInsets.all(0.0),
color: themeData.primaryColor,
icon: new Icon(Icons.clear, size: 18.0),
onPressed: onDelete,
)
如何在Flutter 中调整图标按钮的大小(高度和宽度)?它似乎采用默认的宽度和高度.没有Height或Width属性.
new IconButton(
padding: new EdgeInsets.all(0.0),
color: themeData.primaryColor,
icon: new Icon(Icons.clear, size: 18.0),
onPressed: onDelete,
)
您可以使用SizedBox强制它调整自身大小.
new SizedBox(
height: 18.0,
width: 18.0,
child: new IconButton(
padding: new EdgeInsets.all(0.0),
color: themeData.primaryColor,
icon: new Icon(Icons.clear, size: 18.0),
onPressed: onDelete,
)
)