Skip to content

Instantly share code, notes, and snippets.

@fabiojansenbr
Created December 5, 2019 16:03
Show Gist options
  • Save fabiojansenbr/be84f3dd81b6c18c35b03a7d2ddd61b5 to your computer and use it in GitHub Desktop.
Save fabiojansenbr/be84f3dd81b6c18c35b03a7d2ddd61b5 to your computer and use it in GitHub Desktop.
_deleteData() async {
setState(() {
isLoading = true;
});
await DBProvider.db.deleteAllEmployees();
// wait for 1 second to simulate loading of data
await Future.delayed(const Duration(seconds: 1));
setState(() {
isLoading = false;
});
print('All employees deleted');
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment