[
I can create a button with an icon using this code
ElevatedButton.icon(
icon: Icon(
Icons.home,
color: Colors.green,
size: 30.0,
),
label: Text('Elevated Button'),
onPressed: () {
print('Button Pressed');
},
style: ElevatedButton.styleFrom(
shape: new RoundedRectangleBorder(
borderRadius: new BorderRadius.circular(20.0),
),
),
)
but how to put an arrow on the right side of the button?
3
Answers
It seems like you want a
ListTile
widget, as it hasleading
/trailing
properties:You can also use
IconButton
instead of a regularIcon
in this example.To add two icons to an elevated button, just wrap your child widget with a row widget. See implementation below:
As per your shared Image I have try same design in Various ways choice is yours 😊which way you want to try.
Using ElevatedButton.icon
Result Using
ElevatedButton.icon
->Using OutlinedButton.icon
Result Using
OutlinedButton.icon
->Using ListTile
Result Using
ListTile
->Using GestureDetector
Result Using
GestureDetector
->Using InkWell
Result Using
InkWell
->