Skip to content

Commit 745bc0b

Browse files
authored
refactor: drop support for 'cross_local_storage'
Closes #140
1 parent 47b6a46 commit 745bc0b

5 files changed

+8
-147
lines changed

CHANGELOG.md

+5
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
77

88
## [Unreleased]
99

10+
### Removed
11+
12+
- support for the 'cross_local_storage' package — **BREAKING CHANGE**
13+
[125](https://github.com/dartoos-dev/json_cache/issues/125).
14+
1015
### Fixed
1116

1217
- Refactor code warnings marked on pub.dev —

README.md

+3-16
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@ Rultor.com](https://www.rultor.com/b/dartoos-dev/json_cache)](https://www.rultor
3232
- [JsonCacheLocalStorage — LocalStorage](#jsoncachelocalstorage)
3333
- [JsonCacheSafeLocalStorage — SafeLocalStorage](#jsoncachesafelocalstorage)
3434
- [JsonCacheFlutterSecureStorage — FlutterSecureStorage](#jsoncachefluttersecurestorage)
35-
- [JsonCacheCrossLocalStorage — CrossLocalStorage](#jsoncachecrosslocalstorage)
3635
- [JsonCacheHive — Hive](#jsoncachehive)
3736
- [Unit Test Tips](#unit-test-tips)
3837
- [Mocking](#mocking)
@@ -129,16 +128,16 @@ define it as a **map key** whose associated value is a boolean placeholder value
129128
set to `true`. For example:
130129

131130
```dart
132-
/// Storing a simple text information.
133-
jsonCache.refresh('info', {'an important information': true});
131+
/// Storing a phrase.
132+
jsonCache.refresh('info', {'This is very important information.': true});
134133
135134
// later on…
136135
137136
// This variable is a Map containing a single key.
138137
final cachedInfo = await jsonCache.value('info');
139138
// The key itself is the content of the stored information.
140139
final info = cachedInfo?.keys.first;
141-
print(info); // 'an important information'
140+
print(info); // 'This is very important information.'
142141
143142
```
144143

@@ -321,18 +320,6 @@ is an implementation on top of the
321320
final info = cachedInfo?.keys.first; // 'a secret info'
322321
```
323322

324-
### JsonCacheCrossLocalStorage
325-
326-
[JsonCacheLocalCrossStorage](https://pub.dev/documentation/json_cache/latest/json_cache/JsonCacheCrossLocalStorage-class.html)
327-
is an implementation on top of the
328-
[cross_local_storage](https://pub.dev/packages/cross_local_storage) package.
329-
330-
```dart
331-
332-
final LocalStorageInterface localStorage = await LocalStorage.getInstance();
333-
final JsonCache jsonCache = JsonCacheMem(JsonCacheCrossLocalStorage(localStorage));
334-
```
335-
336323
### JsonCacheHive
337324

338325
[JsonCacheHive](https://pub.dev/documentation/json_cache/latest/json_cache/JsonCacheHive.html)

lib/json_cache.dart

-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
library json_cache;
33

44
export 'src/json_cache.dart';
5-
export 'src/json_cache_cross_local_storage.dart';
65
export 'src/json_cache_exception.dart';
76
export 'src/json_cache_fake.dart';
87
export 'src/json_cache_flutter_secure_storage.dart';

lib/src/json_cache_cross_local_storage.dart

-52
This file was deleted.

test/json_cache_cross_local_storage_test.dart

-78
This file was deleted.

0 commit comments

Comments
 (0)