simple detail view of flood station and readings
This commit is contained in:
1 parent
08c266bc95
commit
dfb9b59560
4 files changed
+68
No files matched your search
@@ -1,6 +1,7 @@
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
import '../model/flood_station.dart';
|
||||
import '../pages/flood_station_page.dart';
|
||||
|
||||
class FloodStationListView extends StatelessWidget {
|
||||
const FloodStationListView({super.key, required List<FloodStation> stations})
|
||||
@@ -14,6 +15,9 @@ class FloodStationListView extends StatelessWidget {
|
||||
itemBuilder: (context, index) {
|
||||
final item = _stations.elementAt(index);
|
||||
return ListTile(
|
||||
onTap: () => Navigator.of(context).push(MaterialPageRoute(
|
||||
builder: (context) => FloodStationPage(floodStation: item),
|
||||
)),
|
||||
title: Text(item.label),
|
||||
subtitle: Text(item.town),
|
||||
);
|
||||
|
||||
Reference in new issue
Block a user