Skip to content

Commit 93d0f9b

Browse files
committed
prepare 1.0.0-nullsafety.0
1 parent 60b8177 commit 93d0f9b

File tree

4 files changed

+16
-7
lines changed

4 files changed

+16
-7
lines changed

CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1+
## 1.0.0-nullsafety.0 - Feb 24, 2021
2+
3+
- **Breaking**:
4+
- Opt into nullsafety.
5+
- Set Dart SDK constraints to `>=2.12.0-0 <3.0.0`.
6+
- Big refactoring to `Logger`, `RealRxStorage` implementation.
7+
18
## 0.0.2 - Jan 4, 2021
29

310
- Refactors `Storage` and `RxStorage`:

README.md

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -43,13 +43,15 @@ A simple usage example:
4343
```dart
4444
import 'package:rx_storage/rx_storage.dart';
4545
46-
class StorageAdapter implements Storage { ... }
46+
class StorageAdapter implements Storage<String, void> { ... }
4747
48-
main() {
49-
final Storage adapter = StorageAdapter();
50-
final RxStorage rxStorage = RxStorage(adapter);
48+
main() async {
49+
final adapter = StorageAdapter();
50+
final rxStorage = RxStorage<String, void>(adapter);
5151
52-
rxStorage.getStringStream('key').listen((value) { ... });
52+
rxStorage.observe('key', (v) => v as String?).listen((String? s) { ... });
53+
await rxStorage.write('key', 'a String', (v) => v);
54+
await rxStorage.read('key', (v) => v as String?);
5355
}
5456
```
5557

lib/src/impl/real_storage.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@ class RealRxStorage<Key extends Object, Options,
168168
}
169169
}
170170

171-
/// Enqueue writing task to a queue.
171+
/// Enqueue writing task to a [AsyncQueue].
172172
@protected
173173
Future<T> enqueueWritingTask<T>(AsyncQueueBlock<T> block) =>
174174
_writeQueue.enqueue(block).then((value) => value as T);

pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,5 +17,5 @@ dependencies:
1717

1818
dev_dependencies:
1919
pedantic: ^1.10.0
20-
test: ^1.16.3
20+
test: ^1.16.4
2121
collection: ^1.15.0

0 commit comments

Comments
 (0)