Skip to content

refactor: drop support for 'cross_local_storage' #142

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Aug 10, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

### Removed

- support for the 'cross_local_storage' package — **BREAKING CHANGE** —
[125](https://github.com/dartoos-dev/json_cache/issues/125).

### Fixed

- Refactor code warnings marked on pub.dev —
Expand Down
19 changes: 3 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ Rultor.com](https://www.rultor.com/b/dartoos-dev/json_cache)](https://www.rultor
- [JsonCacheLocalStorage — LocalStorage](#jsoncachelocalstorage)
- [JsonCacheSafeLocalStorage — SafeLocalStorage](#jsoncachesafelocalstorage)
- [JsonCacheFlutterSecureStorage — FlutterSecureStorage](#jsoncachefluttersecurestorage)
- [JsonCacheCrossLocalStorage — CrossLocalStorage](#jsoncachecrosslocalstorage)
- [JsonCacheHive — Hive](#jsoncachehive)
- [Unit Test Tips](#unit-test-tips)
- [Mocking](#mocking)
Expand Down Expand Up @@ -129,16 +128,16 @@ define it as a **map key** whose associated value is a boolean placeholder value
set to `true`. For example:

```dart
/// Storing a simple text information.
jsonCache.refresh('info', {'an important information': true});
/// Storing a phrase.
jsonCache.refresh('info', {'This is very important information.': true});

// later on…

// This variable is a Map containing a single key.
final cachedInfo = await jsonCache.value('info');
// The key itself is the content of the stored information.
final info = cachedInfo?.keys.first;
print(info); // 'an important information'
print(info); // 'This is very important information.'

```

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

### JsonCacheCrossLocalStorage

[JsonCacheLocalCrossStorage](https://pub.dev/documentation/json_cache/latest/json_cache/JsonCacheCrossLocalStorage-class.html)
is an implementation on top of the
[cross_local_storage](https://pub.dev/packages/cross_local_storage) package.

```dart
final LocalStorageInterface localStorage = await LocalStorage.getInstance();
final JsonCache jsonCache = JsonCacheMem(JsonCacheCrossLocalStorage(localStorage));
```

### JsonCacheHive

[JsonCacheHive](https://pub.dev/documentation/json_cache/latest/json_cache/JsonCacheHive.html)
Expand Down
1 change: 0 additions & 1 deletion lib/json_cache.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
library json_cache;

export 'src/json_cache.dart';
export 'src/json_cache_cross_local_storage.dart';
export 'src/json_cache_exception.dart';
export 'src/json_cache_fake.dart';
export 'src/json_cache_flutter_secure_storage.dart';
Expand Down
52 changes: 0 additions & 52 deletions lib/src/json_cache_cross_local_storage.dart

This file was deleted.

78 changes: 0 additions & 78 deletions test/json_cache_cross_local_storage_test.dart

This file was deleted.