lesnitsky / flutter_localstorage

📦 LocalStorage for Flutter
MIT License
299 stars 65 forks source link

removing key from cache before disposing #98

Closed srolemberg closed 1 year ago

srolemberg commented 1 year ago

This request corrects the situation described in this Issue #94: Unhandled Exception: FileSystemException: File closed:

An error is thrown every time you try to load a new file a second time in the application's lifecycle.

With the fix, during dispose, the code snippet tries to check if the file still exists in the static cache and removes it if it finds it.

lesnitsky commented 1 year ago

available on pub on version 4.0.2