@@ -49,30 +49,30 @@ class MyHomePage extends StatefulWidget {
4949class _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