Skip to content
This repository was archived by the owner on May 7, 2022. It is now read-only.

Commit fb253a4

Browse files
authored
Merge pull request #2 from Autokaka/dev
Dev
2 parents 19170fa + 87f829c commit fb253a4

5 files changed

Lines changed: 10 additions & 18 deletions

File tree

CHANGELOG.md

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,11 @@
1-
## [0.0.2]
1+
## [0.0.3]
22

33
## 任务清单
44

5-
目前还没有非常明确后续对这个插件的拓展方向. 我的初衷是使开发app过程中的model层完全消失, 为此我们目前需要实现:
6-
7-
- [x] 核心功能, json 转 object. 使用value = json.key或者value = json[index]的方式访问类的成员.
8-
- [x] object重新转string. 不是很难, 几小时就能做好.
9-
- [ ] 实现Map和List的基础方法封装, 使得能更高效地操作JsonObject. 具体实现准备直接参考Map和List有关接口.
10-
- [ ] 默认封装一个统一的JsonObject规范. 这个规范在前期将直接写死, 后期可以由开发者自己设定, 用于每个开发团队不同场景下能够适配属于自己的JsonObject.
11-
- [ ] 创建一个model和JsonObject的成员关联, 削弱由dynamic造成的类型弱化问题. 做点和JavaScript里不一样的.
5+
目前还没有非常明确后续对这个插件的拓展方向. 我的初衷是使开发 app 过程中的 model 层完全消失, 为此我们目前需要实现:
126

7+
- [x] 核心功能, json 转 object. 使用 value = json.key 或者 value = json[index]的方式访问类的成员.
8+
- [x] object 重新转 string. 不是很难, 几小时就能做好.
9+
- [ ] 实现 Map 和 List 的基础方法封装, 使得能更高效地操作 JsonObject. 具体实现准备直接参考 Map 和 List 有关接口.
10+
- [ ] 默认封装一个统一的 JsonObject 规范. 这个规范在前期将直接写死, 后期可以由开发者自己设定, 用于每个开发团队不同场景下能够适配属于自己的 JsonObject.
11+
- [ ] 创建一个 model 和 JsonObject 的成员关联, 削弱由 dynamic 造成的类型弱化问题. 做点和 JavaScript 里不一样的.

example/pubspec.lock

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ packages:
172172
path: ".."
173173
relative: true
174174
source: path
175-
version: "0.0.1"
175+
version: "0.0.3"
176176
json_rpc_2:
177177
dependency: transitive
178178
description:

lib/json_object.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ class JsonObject {
3333
String get _valueType => getValue().runtimeType.toString();
3434

3535
void Function(dynamic newValue) _listen;
36-
void _notify(dynamic newValue) => _listen(newValue);
36+
void _notify(dynamic newValue) => _listen?.call(newValue);
3737

3838
static bool isEmpty(JsonObject jsonObject) =>
3939
jsonObject == null || jsonObject.getValue() == null;

pubspec.lock

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -81,13 +81,6 @@ packages:
8181
url: "https://pub.flutter-io.cn"
8282
source: hosted
8383
version: "1.8.0-nullsafety.3"
84-
pretty_json:
85-
dependency: "direct main"
86-
description:
87-
name: pretty_json
88-
url: "https://pub.flutter-io.cn"
89-
source: hosted
90-
version: "1.1.0"
9184
sky_engine:
9285
dependency: transitive
9386
description: flutter

pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: json_object
22
description: You can use json_object to access a json string just like accessing normal objects without using json_serializable or something like that.
3-
version: 0.0.2
3+
version: 0.0.3
44
homepage: https://github.com/Autokaka/json_object.git
55

66
environment:

0 commit comments

Comments
 (0)