improved graph appearance to be more clear

This commit is contained in:
2025-01-27 13:57:35 +01:00
parent e799c3349b
commit fd47053834
2 changed files with 33 additions and 35 deletions

View File

@@ -19,19 +19,17 @@ class FloodStationPage extends StatelessWidget {
future: Api.fetchReadingsFromStation(_floodStation.id),
builder: (context, snapshot) {
if (snapshot.hasData) {
return ReadingGraph(
readings: snapshot.data!,
if (snapshot.data!.isEmpty) {
return Text('No readings on record.');
}
return Center(
child: Padding(
padding: const EdgeInsets.fromLTRB(20, 0, 20, 20),
child: ReadingGraph(
readings: snapshot.data!,
),
),
);
// return ListView.builder(
// itemBuilder: (context, index) {
// return ListTile(
// title:
// Text(snapshot.data!.elementAt(index).value.toString()),
// );
// },
// itemCount: snapshot.data!.length,
// );
} else {
return Placeholder();
}