return ListView.builder(
itemBuilder: (context, position) {
var store = Store.fromJson(stores[position]);
return GestureDetector(
child: Card(
child: Row(
children: [
Container(
alignment: Alignment.center,
width: 120,
height: 120,
child: Text(store.brand),
),
Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
store.distance.toString() + " M",
style: TextStyle(
fontSize: 40,
fontFamily: "Gobold",
),
),
Text(
store.name,
style: TextStyle(
fontSize: 15,
fontFamily: "Abel",
),
),
Text(
store.address + " " + store.zipCode + " " + store.city,
overflow: TextOverflow.fade,
maxLines: 1,
style: TextStyle(
fontSize: 15,
fontFamily: "Abel",
),
),
],
)
],
),
),
onTap: () => {
setState(() {
currentView = VIEW.detail;
_store = store;
})$
},
);
},
itemCount: stores.length,
);
Could someone help me? I've been looking for a solution for several days.
Thank you
try Expanded:
Expanded(child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
store.distance.toString() + " M",
style: TextStyle(
fontSize: 40,
fontFamily: "Gobold",
),
),
Text(
store.name,
style: TextStyle(
fontSize: 15,
fontFamily: "Abel",
),
),
Expanded(child: Text(
store.address + " " + store.zipCode + " " + store.city,