How to get the OutlinedButton as long as the Row’s content ? I have this button inside Column <- SizedBox(width:300) <- Card
OutlinedButton(
onPressed: null,
style: OutlinedButton.styleFrom(
fixedSize: const Size.fromHeight(40),
),
child: Row(
mainAxisAlignment: MainAxisAlignment.center,
children: [
Text(widget.leading,
style: TextStyle(
fontFamily: 'JT', fontSize: 18, color: widget.color)),
const SizedBox(width: 10),
Text(widget.txt,
style: TextStyle(
fontFamily: 'NunitoEB', fontSize: 16, color: widget.color)),
const SizedBox(width: 10),
Text(widget.suffix,
style: TextStyle(
fontFamily: 'JT', fontSize: 18, color: widget.color)),
],
));
2
Answers
use this property in your row
Edit:
Edit 2:
try this out and see if it works even with your container as parent
I’m Try To Solve Your Problem :
Use
SizedBox
to Set Width ofOutlinedButton
Here is Code: