+1
This commit is contained in:
parent
39f48b3323
commit
9ee071cc26
4 changed files with 8 additions and 3 deletions
|
@ -1,3 +1,6 @@
|
|||
# 1.1.0+1
|
||||
* Analyzer nitpick for pana
|
||||
|
||||
# 1.1.0
|
||||
* Updated to framework v1.1.x
|
||||
* Use `package:file`
|
||||
|
|
2
analysis_options.yaml
Normal file
2
analysis_options.yaml
Normal file
|
@ -0,0 +1,2 @@
|
|||
analyzer:
|
||||
strong-mode: true
|
|
@ -32,7 +32,7 @@ class JsonFileService extends Service {
|
|||
var contents = await file.readAsString();
|
||||
|
||||
try {
|
||||
var list = JSON.decode(contents) as List;
|
||||
var list = JSON.decode(contents);
|
||||
_store.items.clear(); // Clear exist in-memory copy
|
||||
_store.items.addAll(list.map(_revive)); // Insert all new entries
|
||||
} catch (e) {
|
||||
|
@ -110,7 +110,7 @@ Map _jsonify(Map map) {
|
|||
return map.keys.fold<Map>({}, (out, k) => out..[k] = _safeForJson(map[k]));
|
||||
}
|
||||
|
||||
_revive(x) {
|
||||
dynamic _revive(x) {
|
||||
if (x is Map) {
|
||||
return x.keys.fold<Map>({}, (out, k) => out..[k] = _revive(x[k]));
|
||||
} else if (x is Iterable)
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
name: angel_file_service
|
||||
version: 1.1.0
|
||||
version: 1.1.0+1
|
||||
description: Angel service that persists data to a file on disk.
|
||||
author: Tobe O <thosakwe@gmail.com>
|
||||
homepage: https://github.com/angel-dart/file_service
|
||||
|
|
Loading…
Reference in a new issue