Reputation: 175
I'm trying to get my TextButtons smaller to make more room on the Row.
TextButton( // Reply button
child: Text('Reply'),
style: ButtonStyle(
padding: MaterialStateProperty.all<EdgeInsets>(EdgeInsets.fromLTRB(0, 0, 0, 0)),
tapTargetSize: MaterialTapTargetSize.shrinkWrap,
)
)
Here's what it looks like in the Inspector
Is there any way to get the buttons and the icon up close and personal with each other and get rid of those yellow lines? I must be missing something. Is there a margin property I'm missing?
Any help would be greatly appreciated.
Upvotes: 0
Views: 2787
Reputation: 6077
My buttons looked like this before the style was applied:
this code was added:
style: ButtonStyle(
padding: MaterialStateProperty.all<EdgeInsets>(EdgeInsets.all(2)),
)
and now they look like this:
fromLTRB
constructor also works - I cannot say what the problem is with OP code.
Upvotes: 1
Reputation: 428
Wrap your text button inside an sized box . It will reduce its size.Give dimensions of sized box according to your requirements.
Upvotes: 1