I want to design a custom component card, an image attached in the card, title section will be overleaping on the image section, and description will be added below image section. how to overleap a text on an image in flutter?
class CardWithImage extends StatelessWidget {
final String title, buttonText;
final String subTitle;
final String body;
final asset;
CardWithImage({
this.title,
this.subTitle,
this.body,
this.asset,
this.buttonText,
});
@override
Widget build(BuildContext context) {
return Container(
width: MediaQuery.of(context).size.width,
margin: EdgeInsets.all(15),
decoration: BoxDecoration(
color: ThemeColors.primaryColor,
borderRadius: BorderRadius.circular(5),
boxShadow: [
BoxShadow(
color: ThemeColors.grey5,
blurRadius: 10,
spreadRadius: 5,
offset: Offset(3, 3),
)
],
),
child: Column(
children: <Widget>[
Image.asset(
asset,
height: 200,
width: MediaQuery.of(context).size.width,
fit: BoxFit.cover,
),
],
),
);
}
}