I'm trying to use Flutter to create a card widget with an icon and a title. But i'm not able to add some margin between border of the cards and the widget.
Here's my card code:
class MyCard extends StatelessWidget{
MyCard({this.title, this.icon});
final Widget title;
final Widget icon;
@override
Widget build(BuildContext context) {
return new Container(
padding: EdgeInsets.only(bottom: 20.0),
child: new Card(
child: new Row(
children: <Widget>[
this.icon,
new Container(
width: 20.0, //I also don't know if this is legal
),
this.title
]
)
)
);
}
}
That's the result, but I'd like to have more padding inside the card in order to have taller cards and the icons more on the right.
