Added ProgressIndicator and Error Message

This commit is contained in:
2025-01-27 14:07:37 +01:00
parent fd47053834
commit 537c231253
2 changed files with 9 additions and 3 deletions

View File

@@ -20,7 +20,7 @@ class FloodStationPage extends StatelessWidget {
builder: (context, snapshot) {
if (snapshot.hasData) {
if (snapshot.data!.isEmpty) {
return Text('No readings on record.');
return Center(child: Text('No readings on record.'));
}
return Center(
child: Padding(
@@ -30,8 +30,10 @@ class FloodStationPage extends StatelessWidget {
),
),
);
} else if (snapshot.hasError) {
return Center(child: Text('An unknown Error occured'));
} else {
return Placeholder();
return Center(child: CircularProgressIndicator());
}
}),
);