Issue
How to resize (height and width) of an IconButton in Flutter? Seems like it takes a default width and height. There is not height or width property.
new IconButton(
padding: new EdgeInsets.all(0.0),
color: themeData.primaryColor,
icon: new Icon(Icons.clear, size: 18.0),
onPressed: onDelete,
)
Solution
You can force it to size itself with the 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,
)
)
Answered By - Stephane
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.