improved graph appearance to be more clear
This commit is contained in:
@@ -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();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user