simple detail view of flood station and readings
This commit is contained in:
@@ -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