Skip to content

Commit 7800788

Browse files
Diksha-MukherjeeAgarwalmarcnause
authored andcommitted
Add loading check guard clause
• To prevent showing snackbar if a user accidentally taps 'Delete all data' while loading.
1 parent e0bc1a6 commit 7800788

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

lib/view/logged_data_screen.dart

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,10 @@ class _LoggedDataScreenState extends State<LoggedDataScreen> {
102102
}
103103

104104
Future<void> _deleteAllFiles() async {
105+
if (_isLoading) {
106+
  return;
107+
}
108+
105109
if (_files.isEmpty) {
106110
ScaffoldMessenger.of(context).showSnackBar(
107111
SnackBar(

0 commit comments

Comments
 (0)