- fix wrong truncate size (use utf8.encode)
- fix an issue with initial storage creation
- fix
clear()(drops data only from a storage instance, not all storages)
- fix
remove(key)(drops value from in-memory cache)
Application document directory is no longer Platform['HOME']/.config as path_provider has desktop support with path_provider_fde.
In order to be able to use this package on desktop, add this to your pubspec.yaml
dependencies:
localstorage: ^3.0.0
path_provider_fde:
git:
url: https://github.com/google/flutter-desktop-embedding/
path: plugins/flutter_plugins/path_provider_fdeSee https://github.com/google/flutter-desktop-embedding/tree/master/plugins/flutter_plugins for more details
- support web (kudos to @AppleEducate)
- add [LocalStorage.stream] which receives new storage values after modifications
- flush writes to fs
- use async read/writes instead of sync
- fix inconsistent return format of
getItem. It now always returnsJsonEncodablerepresentation of an item - add optional
toEncodablearg tosetItem
- update
README.mddocumentation - bump
package_providerdependency to addressgetApplicationSupportDirectory - fix
noSuchMethodErrorin_flush
- add optional
pathargument to specify storage folder - fixes for flutter-desktop-embedding
- add
clearmethod
- add
onErrorproperty (ValueNotifierwhich emits errors)
- Add example application
- Initial release