Skip to content

Commit

Permalink
fixed a bug regarding reload state when no data is in db
Browse files Browse the repository at this point in the history
  • Loading branch information
ats527 committed Feb 24, 2024
1 parent 5dd9d8c commit c77a435
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 8 deletions.
29 changes: 22 additions & 7 deletions lib/screens/student_screens/student_home_screen.dart
Original file line number Diff line number Diff line change
Expand Up @@ -127,13 +127,28 @@ class _StudentHomeScreenState extends State<StudentHomeScreen> {
}
final notifications = snapshot.data as List<Placement>;
if (notifications.isEmpty) {
return LiquidPullToRefresh(
onRefresh: () {
setState(() {});
return Future.value();
},
child: const Center(
child: Text("No notifications found"),
return Center(
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: [
SizedBox(
height: 60,
child: ElevatedButton(
onPressed: () {
setState(() {});
},
child: const Icon(
Icons.refresh,
),
),
),
const SizedBox(
height: 30,
),
const Text(
"No notifications found",
),
],
),
);
} else {
Expand Down
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ publish_to: 'none' # Remove this line if you wish to publish to pub.dev
# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html
# In Windows, build-name is used as the major, minor, and patch parts
# of the product and file versions while build-number is used as the build suffix.
version: 1.0.13+13
version: 1.0.14+14

environment:
sdk: '>=3.2.6 <4.0.0'
Expand Down

0 comments on commit c77a435

Please sign in to comment.