added more info on stations in UI
This commit is contained in:
@@ -15,11 +15,31 @@ class FloodStationListView extends StatelessWidget {
|
||||
itemBuilder: (context, index) {
|
||||
final item = _stations.elementAt(index);
|
||||
return ListTile(
|
||||
isThreeLine: true,
|
||||
onTap: () => Navigator.of(context).push(MaterialPageRoute(
|
||||
builder: (context) => FloodStationPage(floodStation: item),
|
||||
)),
|
||||
title: Text(item.label),
|
||||
subtitle: Text(item.town),
|
||||
subtitle: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Row(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: [
|
||||
Icon(Icons.home_outlined),
|
||||
Padding(padding: EdgeInsets.only(left: 8)),
|
||||
Text(item.town),
|
||||
],
|
||||
),
|
||||
Row(
|
||||
children: [
|
||||
Icon(Icons.water),
|
||||
Padding(padding: EdgeInsets.only(left: 8)),
|
||||
Text(item.riverName),
|
||||
],
|
||||
)
|
||||
],
|
||||
),
|
||||
);
|
||||
},
|
||||
itemCount: _stations.length,
|
||||
|
||||
Reference in New Issue
Block a user