'Managed to make this container but not able to create this orange button stacked up on both the widgets
Widget Card(String title, String cityName, int price, String location,
String imagePath) {
return Column(children: [
Positioned(
child: Container(
width: Get.width,
height: 160,
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.only(
topLeft: Radius.circular(6),
topRight: Radius.circular(6),
),
image: DecorationImage(
fit: BoxFit.cover,
alignment: Alignment.topCenter,
image: AssetImage(
imagePath,
),
),
),
),
),
Stack(children: [
Container(
width: Get.width,
height: 140,
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.only(
bottomRight: Radius.circular(6),
bottomLeft: Radius.circular(6),
),
),
child: Padding(
padding: const EdgeInsets.only(left: 15),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
SizedBox(
height: 18,
),
Text(
title,
style: TextStyle(
color: Colors.black,
fontFamily: "PoppinsMedium",
fontSize: 14),
),
Text(
cityName,
style: TextStyle(
color: Colors.black,
fontFamily: "PoppinsMedium",
fontSize: 14,
),
),
SizedBox(
height: 8,
),
Row(
children: [
Text(
'GHC $price',
style: TextStyle(
color: Color(0xFF2E3034),
fontFamily: "PoppinsBold",
fontSize: 20),
),
Text(
'/ month',
style: TextStyle(
color: Color(0xFF2E3034),
fontFamily: "PoppinsMedium",
fontSize: 12,
),
),
],
),
Row(
children: [
Icon(
Icons.location_on_outlined,
size: 12,
color: Color(0xFF8F92A1),
),
SizedBox(
width: 5,
),
Text(
location,
style: TextStyle(
color: Color(0xFF8F92A1),
fontFamily: "PoppinsMedium",
fontSize: 12,
),
)
],
)
],
),
),
),
]),
]);
}
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|


