25 lines
615 B
Dart
25 lines
615 B
Dart
import 'package:flutter/material.dart';
|
|
|
|
import '../model/flood_station.dart';
|
|
|
|
class FloodStationListView extends StatelessWidget {
|
|
const FloodStationListView({super.key, required List<FloodStation> stations})
|
|
: _stations = stations;
|
|
|
|
final List<FloodStation> _stations;
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return ListView.builder(
|
|
itemBuilder: (context, index) {
|
|
final item = _stations.elementAt(index);
|
|
return ListTile(
|
|
title: Text(item.label),
|
|
subtitle: Text(item.town),
|
|
);
|
|
},
|
|
itemCount: _stations.length,
|
|
);
|
|
}
|
|
}
|