@@ -25,6 +25,7 @@ Rultor.com](https://www.rultor.com/b/dartoos-dev/json_cache)](https://www.rultor
2525 - [ JsonCacheMem — Thread-safe In-memory cache] ( #jsoncachemem )
2626 - [ JsonCachePrefs — SharedPreferences] ( #jsoncacheprefs )
2727 - [ JsonCacheLocalStorage — LocalStorage] ( #jsoncachelocalstorage )
28+ - [ JsonCacheCrossLocalStorage — CrossLocalStorage] ( #jsoncachecrosslocalstorage )
2829- [ Demo application] ( #demo-application )
2930- [ References] ( #references )
3031
@@ -39,13 +40,13 @@ Rultor.com](https://www.rultor.com/b/dartoos-dev/json_cache)](https://www.rultor
3940> Retrieved 09:55, August 22,
4041> 2021] ( https://en.wikipedia.org/wiki/Cache_(computing) )
4142
42- ** JsonCache** is an object-oriented package to cache user data locally in json.
43- It can also be thought of as a layer on top of Flutter's local storage packages
44- like the [ sharable_preferences ] ( https://pub.dev/packages/shared_preferences ) and
45- [ localstorage ] ( https://pub.dev/packages/localstorage ) packages.
46-
47- Therefore, this package aims to unify most of Flutter's local caching packages
48- into an elegant caching API.
43+ ** JsonCache** is an object-oriented package for the local caching of user data
44+ in json. It can also be thought of as a layer on top of Flutter's local storage
45+ packages like the
46+ [ sharable_preferences ] ( https://pub.dev/packages/shared_preferences ) and
47+ [ localstorage ] ( https://pub.dev/packages/localstorage ) packages. Thus, this
48+ package aims to unify most of Flutter's local caching packages into a stable and
49+ elegant caching API.
4950
5051** Why Json?**
5152
@@ -181,7 +182,7 @@ is an implementation on top of the
181182
182183[ JsonCacheLocalStorage] ( https://pub.dev/documentation/json_cache/latest/json_cache/JsonCacheLocalStorage-class.html )
183184is an implementation on top of the
184- [ localstorage] ( https://pub.dev/packages/localstorage )
185+ [ localstorage] ( https://pub.dev/packages/localstorage ) package.
185186
186187``` dart
187188 …
@@ -190,6 +191,19 @@ is an implementation on top of the
190191 …
191192```
192193
194+ ### JsonCacheCrossLocalStorage
195+
196+ [ JsonCacheLocalCrossStorage] ( https://pub.dev/documentation/json_cache/latest/json_cache/JsonCacheCrossLocalStorage-class.html )
197+ is an implementation on top of the
198+ [ cross_local_storage] ( https://pub.dev/packages/cross_local_storage ) package.
199+
200+ ``` dart
201+ …
202+ final LocalStorageInterface prefs = await LocalStorage.getInstance();
203+ final JsonCache jsonCache = JsonCacheMem(JsonCacheCrossLocalStorage(prefs));
204+ …
205+ ```
206+
193207## Demo application
194208
195209The demo application provides a fully working example, focused on demonstrating
0 commit comments