Closed peterhijma closed 3 years ago
@phijma That would be code to fix in the moor repository, in particular the following file https://github.com/simolus3/moor/blob/master/extras/encryption/lib/encrypted_moor.dart
You can try opening a PR. Otherwise you can simply don't call close
if the user is unauthenticated, because there is not database open for it.
Thanks @davidmartos96. I saw encrypted_moor
and somehow thought this was where I needed to be. Sorry to bother you!
If a user starts the app and is unauthenticated, I would like to log the user out and remove their database. But since using the new version of flutter + dart which has null safety and such, I get this error:
Any clue?
This is no problem of course when the user is authenticated and uses the logout button. As in the meantime the database is always initialized. This is only a problem if the user is authenticated, closes the app, and then restarts it.