Skip to content

Commit a69c319

Browse files
author
lyy
committed
v1.0
1 parent 4bdd776 commit a69c319

8 files changed

Lines changed: 332 additions & 20 deletions

File tree

.vscode/launch.json

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

example/android/.project

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<projectDescription>
3+
<name>android</name>
4+
<comment>Project android created by Buildship.</comment>
5+
<projects>
6+
</projects>
7+
<buildSpec>
8+
<buildCommand>
9+
<name>org.eclipse.buildship.core.gradleprojectbuilder</name>
10+
<arguments>
11+
</arguments>
12+
</buildCommand>
13+
</buildSpec>
14+
<natures>
15+
<nature>org.eclipse.buildship.core.gradleprojectnature</nature>
16+
</natures>
17+
</projectDescription>
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
connection.project.dir=
2+
eclipse.preferences.version=1

example/android/app/.classpath

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<classpath>
3+
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8/"/>
4+
<classpathentry kind="con" path="org.eclipse.buildship.core.gradleclasspathcontainer"/>
5+
<classpathentry kind="output" path="bin/default"/>
6+
</classpath>

example/android/app/.project

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<projectDescription>
3+
<name>app</name>
4+
<comment>Project app created by Buildship.</comment>
5+
<projects>
6+
</projects>
7+
<buildSpec>
8+
<buildCommand>
9+
<name>org.eclipse.jdt.core.javabuilder</name>
10+
<arguments>
11+
</arguments>
12+
</buildCommand>
13+
<buildCommand>
14+
<name>org.eclipse.buildship.core.gradleprojectbuilder</name>
15+
<arguments>
16+
</arguments>
17+
</buildCommand>
18+
</buildSpec>
19+
<natures>
20+
<nature>org.eclipse.jdt.core.javanature</nature>
21+
<nature>org.eclipse.buildship.core.gradleprojectnature</nature>
22+
</natures>
23+
</projectDescription>
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
connection.project.dir=..
2+
eclipse.preferences.version=1

example/lib/main.dart

Lines changed: 23 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -49,30 +49,30 @@ class MyHomePage extends StatefulWidget {
4949
class _MyHomePageState extends State<MyHomePage> {
5050

5151
Map<String, dynamic> jsonObj;
52+
BuildContext tContext;
5253

5354
@override
5455
void initState() {
55-
// TODO: implement initState
5656
super.initState();
5757
var testString = '''{
58-
"ParaString": "sahgozkad",
58+
"ParaString": "www.apigj.com",
5959
"ParaObject": {
60-
"ObjectType": "laeg",
61-
"ObjectName": "bek",
62-
"ObjectId": "cosoljim",
63-
"FatherId": "wef"
60+
"ObjectType": "Api",
61+
"ObjectName": "Manager",
62+
"ObjectId": "Code",
63+
"FatherId": "Generator"
6464
},
6565
"ParaLong": 6222123188092928,
6666
"ParaInt": 5303,
6767
"ParaFloat": -268311581425.664,
6868
"ParaBool": false,
6969
"ParaArrString": [
70-
"diedo",
71-
"cigow"
70+
"easy",
71+
"fast"
7272
],
7373
"ParaArrObj": [
7474
{
75-
"SParaString": "ferpatbal",
75+
"SParaString": "Work efficiently",
7676
"SParaLong": 7996655703949312,
7777
"SParaInt": 8429,
7878
"SParaFloat": -67669103057.3056,
@@ -99,7 +99,7 @@ class _MyHomePageState extends State<MyHomePage> {
9999
]
100100
},
101101
{
102-
"SParaString": "jujaz",
102+
"SParaString": "Let's go",
103103
"SParaLong": 641970970034176,
104104
"SParaInt": 37,
105105
"SParaFloat": 556457726574.592,
@@ -160,11 +160,18 @@ class _MyHomePageState extends State<MyHomePage> {
160160
// the App.build method, and use it to set our appbar title.
161161
title: Text(widget.title),
162162
),
163-
body: SingleChildScrollView(
164-
// Center is a layout widget. It takes a single child and positions it
165-
// in the middle of the parent.
166-
child: JsonViewerWidget(jsonObj)
167-
),
168-
);
163+
body: Builder(
164+
builder: (context) {
165+
tContext = context;
166+
return SafeArea(
167+
child: SingleChildScrollView(
168+
// Center is a layout widget. It takes a single child and positions it
169+
// in the middle of the parent.
170+
child: JsonViewerWidget(jsonObj)
171+
),
172+
);
173+
}
174+
)
175+
);
169176
}
170177
}

0 commit comments

Comments
 (0)