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

Commit 19170fa

Browse files
authored
Merge pull request #1 from Autokaka/dev
Dev
2 parents e958b36 + 3c0a8cd commit 19170fa

16 files changed

Lines changed: 417 additions & 85 deletions

.vscode/launch.json

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
{
2+
// 使用 IntelliSense 了解相关属性。
3+
// 悬停以查看现有属性的描述。
4+
// 欲了解更多信息,请访问: https://go.microsoft.com/fwlink/?linkid=830387
5+
"version": "0.2.0",
6+
"configurations": [
7+
{
8+
"name": "json_object",
9+
"request": "launch",
10+
"type": "dart"
11+
},
12+
{
13+
"name": "example",
14+
"cwd": "example",
15+
"request": "launch",
16+
"type": "dart"
17+
}
18+
]
19+
}

CHANGELOG.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
## [0.0.1]
1+
## [0.0.2]
22

33
## 任务清单
44

55
目前还没有非常明确后续对这个插件的拓展方向. 我的初衷是使开发app过程中的model层完全消失, 为此我们目前需要实现:
66

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

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@
5555
目前还没有非常明确后续对这个插件的拓展方向. 我的初衷是使开发app过程中的model层完全消失, 为此我们目前需要实现:
5656

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

example/ios/Podfile.lock

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
PODS:
2+
- Flutter (1.0.0)
3+
- integration_test (0.0.1):
4+
- Flutter
5+
6+
DEPENDENCIES:
7+
- Flutter (from `Flutter`)
8+
- integration_test (from `.symlinks/plugins/integration_test/ios`)
9+
10+
EXTERNAL SOURCES:
11+
Flutter:
12+
:path: Flutter
13+
integration_test:
14+
:path: ".symlinks/plugins/integration_test/ios"
15+
16+
SPEC CHECKSUMS:
17+
Flutter: 434fef37c0980e73bb6479ef766c45957d4b510c
18+
integration_test: 5ed24a436eb7ec17b6a13046e9bf7ca4a404e59e
19+
20+
PODFILE CHECKSUM: aafe91acc616949ddb318b77800a7f51bffa2a4c
21+
22+
COCOAPODS: 1.10.0

example/ios/Runner.xcodeproj/project.pbxproj

Lines changed: 89 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,14 @@
33
archiveVersion = 1;
44
classes = {
55
};
6-
objectVersion = 46;
6+
objectVersion = 50;
77
objects = {
88

99
/* Begin PBXBuildFile section */
1010
1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */ = {isa = PBXBuildFile; fileRef = 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */; };
1111
3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; };
1212
74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74858FAE1ED2DC5600515810 /* AppDelegate.swift */; };
13+
75832A69616A84BF5CE92C56 /* Pods_Runner.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = DEE6288BCC3340CA851C9E9C /* Pods_Runner.framework */; };
1314
97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; };
1415
97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FD1CF9000F007C117D /* Assets.xcassets */; };
1516
97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */; };
@@ -32,29 +33,42 @@
3233
1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GeneratedPluginRegistrant.h; sourceTree = "<group>"; };
3334
1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeneratedPluginRegistrant.m; sourceTree = "<group>"; };
3435
3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = "<group>"; };
36+
3CF3C3638AF0C33CB4058B23 /* Pods-Runner.profile.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.profile.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.profile.xcconfig"; sourceTree = "<group>"; };
3537
74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Runner-Bridging-Header.h"; sourceTree = "<group>"; };
3638
74858FAE1ED2DC5600515810 /* AppDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; };
3739
7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = "<group>"; };
40+
808849BEAD585EE80F0526F4 /* Pods-Runner.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.debug.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"; sourceTree = "<group>"; };
3841
9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Debug.xcconfig; path = Flutter/Debug.xcconfig; sourceTree = "<group>"; };
3942
9740EEB31CF90195004384FC /* Generated.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Generated.xcconfig; path = Flutter/Generated.xcconfig; sourceTree = "<group>"; };
4043
97C146EE1CF9000F007C117D /* Runner.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Runner.app; sourceTree = BUILT_PRODUCTS_DIR; };
4144
97C146FB1CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = "<group>"; };
4245
97C146FD1CF9000F007C117D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; };
4346
97C147001CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = "<group>"; };
4447
97C147021CF9000F007C117D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
48+
984B04B7F47EBCF9202CF019 /* Pods-Runner.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.release.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"; sourceTree = "<group>"; };
49+
DEE6288BCC3340CA851C9E9C /* Pods_Runner.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Runner.framework; sourceTree = BUILT_PRODUCTS_DIR; };
4550
/* End PBXFileReference section */
4651

4752
/* Begin PBXFrameworksBuildPhase section */
4853
97C146EB1CF9000F007C117D /* Frameworks */ = {
4954
isa = PBXFrameworksBuildPhase;
5055
buildActionMask = 2147483647;
5156
files = (
57+
75832A69616A84BF5CE92C56 /* Pods_Runner.framework in Frameworks */,
5258
);
5359
runOnlyForDeploymentPostprocessing = 0;
5460
};
5561
/* End PBXFrameworksBuildPhase section */
5662

5763
/* Begin PBXGroup section */
64+
8C6CA652DA738470E6292256 /* Frameworks */ = {
65+
isa = PBXGroup;
66+
children = (
67+
DEE6288BCC3340CA851C9E9C /* Pods_Runner.framework */,
68+
);
69+
name = Frameworks;
70+
sourceTree = "<group>";
71+
};
5872
9740EEB11CF90186004384FC /* Flutter */ = {
5973
isa = PBXGroup;
6074
children = (
@@ -72,6 +86,8 @@
7286
9740EEB11CF90186004384FC /* Flutter */,
7387
97C146F01CF9000F007C117D /* Runner */,
7488
97C146EF1CF9000F007C117D /* Products */,
89+
EE770BB771C98CC8981E77DA /* Pods */,
90+
8C6CA652DA738470E6292256 /* Frameworks */,
7591
);
7692
sourceTree = "<group>";
7793
};
@@ -98,19 +114,32 @@
98114
path = Runner;
99115
sourceTree = "<group>";
100116
};
117+
EE770BB771C98CC8981E77DA /* Pods */ = {
118+
isa = PBXGroup;
119+
children = (
120+
808849BEAD585EE80F0526F4 /* Pods-Runner.debug.xcconfig */,
121+
984B04B7F47EBCF9202CF019 /* Pods-Runner.release.xcconfig */,
122+
3CF3C3638AF0C33CB4058B23 /* Pods-Runner.profile.xcconfig */,
123+
);
124+
name = Pods;
125+
path = Pods;
126+
sourceTree = "<group>";
127+
};
101128
/* End PBXGroup section */
102129

103130
/* Begin PBXNativeTarget section */
104131
97C146ED1CF9000F007C117D /* Runner */ = {
105132
isa = PBXNativeTarget;
106133
buildConfigurationList = 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */;
107134
buildPhases = (
135+
6C6704007C1202819FD98FBC /* [CP] Check Pods Manifest.lock */,
108136
9740EEB61CF901F6004384FC /* Run Script */,
109137
97C146EA1CF9000F007C117D /* Sources */,
110138
97C146EB1CF9000F007C117D /* Frameworks */,
111139
97C146EC1CF9000F007C117D /* Resources */,
112140
9705A1C41CF9048500538489 /* Embed Frameworks */,
113141
3B06AD1E1E4923F5004D2608 /* Thin Binary */,
142+
3B18E3690339ED5364DF16C6 /* [CP] Embed Pods Frameworks */,
114143
);
115144
buildRules = (
116145
);
@@ -183,6 +212,45 @@
183212
shellPath = /bin/sh;
184213
shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" embed_and_thin";
185214
};
215+
3B18E3690339ED5364DF16C6 /* [CP] Embed Pods Frameworks */ = {
216+
isa = PBXShellScriptBuildPhase;
217+
buildActionMask = 2147483647;
218+
files = (
219+
);
220+
inputFileListPaths = (
221+
"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-input-files.xcfilelist",
222+
);
223+
name = "[CP] Embed Pods Frameworks";
224+
outputFileListPaths = (
225+
"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-output-files.xcfilelist",
226+
);
227+
runOnlyForDeploymentPostprocessing = 0;
228+
shellPath = /bin/sh;
229+
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh\"\n";
230+
showEnvVarsInLog = 0;
231+
};
232+
6C6704007C1202819FD98FBC /* [CP] Check Pods Manifest.lock */ = {
233+
isa = PBXShellScriptBuildPhase;
234+
buildActionMask = 2147483647;
235+
files = (
236+
);
237+
inputFileListPaths = (
238+
);
239+
inputPaths = (
240+
"${PODS_PODFILE_DIR_PATH}/Podfile.lock",
241+
"${PODS_ROOT}/Manifest.lock",
242+
);
243+
name = "[CP] Check Pods Manifest.lock";
244+
outputFileListPaths = (
245+
);
246+
outputPaths = (
247+
"$(DERIVED_FILE_DIR)/Pods-Runner-checkManifestLockResult.txt",
248+
);
249+
runOnlyForDeploymentPostprocessing = 0;
250+
shellPath = /bin/sh;
251+
shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";
252+
showEnvVarsInLog = 0;
253+
};
186254
9740EEB61CF901F6004384FC /* Run Script */ = {
187255
isa = PBXShellScriptBuildPhase;
188256
buildActionMask = 2147483647;
@@ -288,10 +356,14 @@
288356
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
289357
CLANG_ENABLE_MODULES = YES;
290358
CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
359+
DEVELOPMENT_TEAM = P566DZPNMN;
291360
ENABLE_BITCODE = NO;
292361
INFOPLIST_FILE = Runner/Info.plist;
293-
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
294-
PRODUCT_BUNDLE_IDENTIFIER = com.example.example;
362+
LD_RUNPATH_SEARCH_PATHS = (
363+
"$(inherited)",
364+
"@executable_path/Frameworks",
365+
);
366+
PRODUCT_BUNDLE_IDENTIFIER = "com.dshitpie.json-object-example";
295367
PRODUCT_NAME = "$(TARGET_NAME)";
296368
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
297369
SWIFT_VERSION = 5.0;
@@ -399,7 +471,8 @@
399471
MTL_ENABLE_DEBUG_INFO = NO;
400472
SDKROOT = iphoneos;
401473
SUPPORTED_PLATFORMS = iphoneos;
402-
SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
474+
SWIFT_COMPILATION_MODE = wholemodule;
475+
SWIFT_OPTIMIZATION_LEVEL = "-O";
403476
TARGETED_DEVICE_FAMILY = "1,2";
404477
VALIDATE_PRODUCT = YES;
405478
};
@@ -412,10 +485,14 @@
412485
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
413486
CLANG_ENABLE_MODULES = YES;
414487
CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
488+
DEVELOPMENT_TEAM = P566DZPNMN;
415489
ENABLE_BITCODE = NO;
416490
INFOPLIST_FILE = Runner/Info.plist;
417-
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
418-
PRODUCT_BUNDLE_IDENTIFIER = com.example.example;
491+
LD_RUNPATH_SEARCH_PATHS = (
492+
"$(inherited)",
493+
"@executable_path/Frameworks",
494+
);
495+
PRODUCT_BUNDLE_IDENTIFIER = "com.dshitpie.json-object-example";
419496
PRODUCT_NAME = "$(TARGET_NAME)";
420497
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
421498
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
@@ -431,10 +508,14 @@
431508
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
432509
CLANG_ENABLE_MODULES = YES;
433510
CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
511+
DEVELOPMENT_TEAM = P566DZPNMN;
434512
ENABLE_BITCODE = NO;
435513
INFOPLIST_FILE = Runner/Info.plist;
436-
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
437-
PRODUCT_BUNDLE_IDENTIFIER = com.example.example;
514+
LD_RUNPATH_SEARCH_PATHS = (
515+
"$(inherited)",
516+
"@executable_path/Frameworks",
517+
);
518+
PRODUCT_BUNDLE_IDENTIFIER = "com.dshitpie.json-object-example";
438519
PRODUCT_NAME = "$(TARGET_NAME)";
439520
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
440521
SWIFT_VERSION = 5.0;

example/ios/Runner.xcworkspace/contents.xcworkspacedata

Lines changed: 3 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

example/lib/home.dart

Lines changed: 37 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import 'package:json_object/json_object.dart';
22
import 'package:flutter/material.dart';
3-
import 'package:pretty_json/pretty_json.dart';
43

54
class HomePage extends StatefulWidget {
65
@override
@@ -29,7 +28,7 @@ class _HomePageState extends State<HomePage> {
2928
@override
3029
void initState() {
3130
super.initState();
32-
jsonObject = JsonObject().fromString(jsonStr);
31+
jsonObject = JsonObject.fromString(jsonStr);
3332
}
3433

3534
@override
@@ -42,13 +41,12 @@ class _HomePageState extends State<HomePage> {
4241
padding: EdgeInsets.all(10),
4342
children: [
4443
/// get list
45-
buildDivider(),
4644
Text(
4745
"转换成对象后的jsonObject: ",
4846
style: Theme.of(context).textTheme.headline5,
4947
),
5048
Text(jsonObject.getValue().runtimeType.toString()),
51-
Text(prettyJson(jsonObject.getValue(), indent: 4)),
49+
Text(jsonObject.encodePretty(indent: 4)),
5250

5351
/// get map
5452
buildDivider(),
@@ -57,7 +55,7 @@ class _HomePageState extends State<HomePage> {
5755
style: Theme.of(context).textTheme.headline5,
5856
),
5957
Text(jsonObject[0].getValue().runtimeType.toString()),
60-
Text(prettyJson(jsonObject[0].getValue(), indent: 4)),
58+
Text(jsonObject[0].encodePretty(indent: 4)),
6159

6260
/// get url
6361
buildDivider(),
@@ -66,12 +64,12 @@ class _HomePageState extends State<HomePage> {
6664
style: Theme.of(context).textTheme.headline5,
6765
),
6866
Text(jsonObject[0].url.getValue().runtimeType.toString()),
69-
Text(prettyJson(jsonObject[0].url.getValue(), indent: 4)),
67+
Text(jsonObject[0].url.encodePretty(indent: 4)),
7068
ElevatedButton(
7169
onPressed: () => setState(
7270
() => jsonObject[0].url = jsonObject[1].url.getValue(),
7371
),
74-
child: Text("把百度的链接改成谷歌的"),
72+
child: Text("把百度的url改成谷歌的url"),
7573
),
7674

7775
/// get name
@@ -81,7 +79,7 @@ class _HomePageState extends State<HomePage> {
8179
style: Theme.of(context).textTheme.headline5,
8280
),
8381
Text(jsonObject[0].name.getValue().runtimeType.toString()),
84-
Text(prettyJson(jsonObject[0].name.getValue(), indent: 4)),
82+
Text(jsonObject[0].name.encodePretty(indent: 4)),
8583

8684
/// get time
8785
buildDivider(),
@@ -90,13 +88,43 @@ class _HomePageState extends State<HomePage> {
9088
style: Theme.of(context).textTheme.headline5,
9189
),
9290
Text(jsonObject[0].time.getValue().runtimeType.toString()),
93-
Text(prettyJson(jsonObject[0].time.getValue(), indent: 4)),
91+
Text(jsonObject[0].time.encodePretty(indent: 4)),
9492
ElevatedButton(
9593
onPressed: () => setState(
9694
() => jsonObject[0].time = 111111111,
9795
),
9896
child: Text("修改jsonObject[0].time为111111111"),
9997
),
98+
99+
/// add key value pairs using dot operator
100+
buildDivider(),
101+
Text(
102+
"访问jsonObject[1].stars: ",
103+
style: Theme.of(context).textTheme.headline5,
104+
),
105+
Text(jsonObject[1].stars.getValue().runtimeType.toString()),
106+
Text(jsonObject[1].stars.encodePretty(indent: 4)),
107+
ElevatedButton(
108+
onPressed: () => setState(
109+
() => jsonObject[1].stars = 5,
110+
),
111+
child: Text('jsonObject[1].stars = 5'),
112+
),
113+
114+
/// add key value pairs using add()
115+
buildDivider(),
116+
Text(
117+
"访问jsonObject[0].stars: ",
118+
style: Theme.of(context).textTheme.headline5,
119+
),
120+
Text(jsonObject[0].stars.getValue().runtimeType.toString()),
121+
Text(jsonObject[0].stars.encodePretty(indent: 4)),
122+
ElevatedButton(
123+
onPressed: () => setState(
124+
() => jsonObject[0].add("stars", 5),
125+
),
126+
child: Text('jsonObject[0].add("stars", 5)'),
127+
),
100128
],
101129
),
102130
);

0 commit comments

Comments
 (0)