Closed doc-rj-celltrak closed 3 years ago
Hmmmm, we're seeing the issue with setItem() too, even though we are awaiting ready during initialization.
flutter: NoSuchMethodError: The method 'lock' was called on null. Receiver: null Tried calling: lock() flutter:
===
final storage = LocalStorage('redux.json', cttPath); await storage.ready; ...
Same issue here after updating from 3.0.3+6 to 3.0.4+7
Try to change version from ^3.0.4+7 to ^3.0.4
please check v3.0.5
sorry for the inconvenience
In 3.0.4+7, calling deleteItem() crashes in flush() if there is no file (nothing has been written yet).
flutter: NoSuchMethodError: The method 'lock' was called on null. Receiver: null Tried calling: lock() flutter:
0 Object.noSuchMethod (dart:core-patch/object_patch.dart:51:5)
1 DirUtils.flush (package:localstorage/src/directory/io.dart:46:25)
2 LocalStorage._flush (package:localstorage/localstorage.dart:103:18)
3 LocalStorage.deleteItem (package:localstorage/localstorage.dart:92:12)