i have a problem to reducing the size of the textbutton
enter image description here
around the blute text is the size that i want to reduce to it’s child which is a containar that include text() as it’s child
childeren:[
.
.
.
TextButton(
onPressed: () => Navigator.push(
context,
MaterialPageRoute(
builder: (context) => const LoginModal(),
),
),
child: Container(
padding: const EdgeInsets.only(bottom: 0.5),
decoration: const BoxDecoration(
border: Border(
bottom: BorderSide(
color: cprimary,
width: 1,
),
),
),
child: const Text(
'قوانین و مقررات',
style: TextStyle(
color: cprimary,
fontSize: 12,
fontWeight: FontWeight.w500),
),
),
),
i try wrapping expanded and sized box and minimum size in style !
if you have info , happy to hear from you guys !
2
Answers
Why don’t you consider RichText.?
or you can use GestureDetector
You can set
tapTargetSize
andpadding
to theTextButton
as below: