11import 'package:flutter/material.dart' ;
2- import 'package:efox_flutter/store/STORE.dart' show STORE;
2+ import 'package:efox_flutter/store/store.dart' show STORE;
3+ import 'header.dart' as Header;
34import 'package:efox_flutter/components/markdownComp.dart' as MarkDownComp;
45import 'package:efox_flutter/lang/app_translations.dart' show AppTranslations;
56import 'package:efox_flutter/components/baseComp.dart' as BaseComp;
@@ -13,10 +14,10 @@ class Index extends StatefulWidget {
1314 final String originCodeUrl;
1415 final String codeUrl;
1516 final String mdUrl;
16- final String name ;
17+ final String title ;
1718 Index ({
1819 Key key,
19- this .name ,
20+ this .title ,
2021 this .demoChild,
2122 this .originCodeUrl,
2223 this .codeUrl,
@@ -25,7 +26,7 @@ class Index extends StatefulWidget {
2526
2627 @override
2728 State <StatefulWidget > createState () => IndexState (
28- name : name ,
29+ title : title ,
2930 demoChild: demoChild,
3031 originCodeUrl: originCodeUrl,
3132 codeUrl: codeUrl,
@@ -40,13 +41,13 @@ class IndexState extends State<Index> {
4041 final String originCodeUrl;
4142 final String codeUrl;
4243 final String mdUrl;
43- final String name ;
44+ final String title ;
4445 bool loading = true ;
4546 dynamic model;
4647
4748 IndexState ({
4849 Key key,
49- this .name ,
50+ this .title ,
5051 this .modelChild,
5152 this .mdList,
5253 this .demoChild,
@@ -63,15 +64,17 @@ class IndexState extends State<Index> {
6364
6465 void init () async {
6566 this ._bodyList.length = 0 ;
66- this ._bodyList.add (await MarkDownComp .Index (await this .getMdFile (this .mdUrl)));
67+ this
68+ ._bodyList
69+ .add (await MarkDownComp .Index (await this .getMdFile (this .mdUrl)));
6770
6871 // 增加
6972 if (this .demoChild != null ) {
7073 this .demoChild.forEach ((Widget item) {
7174 this ._bodyList.add (ExampleComp .Index (child: item));
7275 });
7376 }
74-
77+
7578 setState (() {
7679 this .loading = false ;
7780 });
@@ -83,7 +86,7 @@ class IndexState extends State<Index> {
8386 this .model = model;
8487 return Scaffold (
8588 appBar: AppBar (
86- title: Text (this .name ),
89+ title: Header . Index (this .title ),
8790 actions: this .getActions (context, model),
8891 ),
8992 body: this .loading ? this .renderLoading () : this .renderWidget (),
@@ -102,7 +105,7 @@ class IndexState extends State<Index> {
102105 Navigator .of (context).push (
103106 MaterialPageRoute (builder: (BuildContext context) {
104107 return BaseComp .Index (
105- title: this .name ,
108+ title: this .title ,
106109 child: (context, child, model) {
107110 return MarkDownComp .Index (mdStr);
108111 },
@@ -163,7 +166,9 @@ class IndexState extends State<Index> {
163166 child: Row (children: [
164167 Icon (
165168 Icons .home,
169+ color: Color (model.theme.blackColor),
166170 ),
171+ Text (" " ),
167172 Text ('官网' ),
168173 ]),
169174 value: 0 ,
@@ -172,7 +177,9 @@ class IndexState extends State<Index> {
172177 child: Row (children: [
173178 Icon (
174179 Icons .all_inclusive,
180+ color: Color (model.theme.blackColor),
175181 ),
182+ Text (" " ),
176183 Text ("Markdown" ),
177184 ]),
178185 value: 1 ,
@@ -181,8 +188,10 @@ class IndexState extends State<Index> {
181188 child: Row (children: [
182189 Icon (
183190 Icons .code,
191+ color: Color (model.theme.blackColor),
184192 ),
185- Text (this .name),
193+ Text (" " ),
194+ Text (this .title),
186195 ]),
187196 value: 2 ,
188197 ),
@@ -217,15 +226,16 @@ class IndexState extends State<Index> {
217226 mainAxisSize: MainAxisSize .min,
218227 children: < Widget > [
219228 CircularProgressIndicator (
220- backgroundColor: Color (this .model.theme.secondColor),
229+ // backgroundColor: Color(this.model.theme.mainColor),
230+ strokeWidth: 4 ,
221231 ),
222232 Container (
223233 padding: const EdgeInsets .fromLTRB (16.0 , 16.0 , 16.0 , 0 ),
224234 child: Text (
225235 AppTranslations .of (context).t ('loading' ),
226236 style: TextStyle (
227237 color: Color (this .model.theme.secondColor),
228- fontSize: 16 .0 ),
238+ fontSize: 20 .0 ),
229239 ),
230240 )
231241 ],
0 commit comments