I want to add color gradient to a card in Flutter, tried several ways with Container
and decoration
but can't get the entire code to work as it should.
This is the current working code, I want to replace line 3 with a gradient:
return new Card(
elevation: 5.0,
color: color.orangeAccent, //I want to replace this color with a gradient
child: Padding(
padding: new EdgeInsets.all(15.0),
child: Column(
children: <Widget>[
InkWell(
onTap: () {},
child: Container(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[],
),
),
),
]
)
),
);
I played around with the advice given in this post here but cannot integrate it with my code properly.