Is there a way to add a trailing icon to a TextButton?
Here's my code:
TextButton(
child: Center(
child: Text ('Dummy', style: GoogleFonts.openSans (
color: Colors.white, fontWeight: FontWeight.w400,
fontSize: 28),),
),
onPressed: () {
Navigator.push(
context,
MaterialPageRoute(builder: (context) => FourteenthRoute(),),);
}
),
You can simply child widget of the TextButton with Row widget.
TextButton(
onPressed: () => {
Navigator.push(
context,
MaterialPageRoute(
builder: (context) => FourteenthRoute(),
),
)
},
child: Row(
mainAxisSize: MainAxisSize.min,
children: [
Text(
"Dummy",
style: GoogleFonts.openSans(
color: Colors.white,
fontWeight: FontWeight.w400,
fontSize: 28),
),
Icon(Icons.menu)
],
),
),
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With