File tree 2 files changed +39
-7
lines changed
2 files changed +39
-7
lines changed Original file line number Diff line number Diff line change @@ -64,9 +64,7 @@ class IndexState extends State<Index> {
64
64
this ._bodyList.length = 0 ;
65
65
String mdText = await this .getMdFile (this .mdUrl);
66
66
if (mdText.length > 30 || ! this .model.config.state.isPro) {
67
- this
68
- ._bodyList
69
- .add (await MarkDownComp .Index (mdText));
67
+ this ._bodyList.add (await MarkDownComp .Index (mdText));
70
68
// demo
71
69
if (this .demoChild != null && this .demoChild.length > 0 ) {
72
70
this .demoChild.forEach ((Widget item) {
@@ -87,9 +85,9 @@ class IndexState extends State<Index> {
87
85
this .model = model;
88
86
return Scaffold (
89
87
appBar: AppBar (
90
- title: Header .Index (
88
+ /* title: Header.Index(
91
89
this.title,
92
- ),
90
+ ), */
93
91
actions: this .getActions (
94
92
context,
95
93
),
Original file line number Diff line number Diff line change @@ -128,7 +128,41 @@ class _IndexState extends State<Index> {
128
128
129
129
@override
130
130
Widget build (BuildContext context) {
131
- return SingleChildScrollView (
131
+ return Scaffold (
132
+ appBar: AppBar (
133
+ title: Text (AppLocalizations .$t ('nav_title_1' )),
134
+ elevation: 0 ,
135
+ centerTitle: true ,
136
+ ),
137
+ body: ListView .builder (
138
+ shrinkWrap: true ,
139
+ itemCount: _getList ().length * 2 ,
140
+ itemBuilder: (context, index) {
141
+ double _index = index / 2 ;
142
+ if (index % 2 == 0 ) {
143
+ dynamic item = _getList ()[_index.toInt ()];
144
+ return ListTile (
145
+ onTap: () {
146
+ actionsEvent (item['index' ]);
147
+ },
148
+ leading: Icon (
149
+ IconData (
150
+ item['icon' ],
151
+ fontFamily: 'MaterialIcons' ,
152
+ matchTextDirection: true ,
153
+ ),
154
+ ),
155
+ title: Text (item['name' ]),
156
+ );
157
+ } else {
158
+ return Divider (
159
+ color: Color (AppTheme .lineColor),
160
+ );
161
+ }
162
+ },
163
+ ),
164
+ );
165
+ /* return SingleChildScrollView(
132
166
child: Column(
133
167
children: <Widget>[
134
168
Container(
@@ -192,7 +226,7 @@ class _IndexState extends State<Index> {
192
226
),
193
227
],
194
228
),
195
- );
229
+ ); */
196
230
}
197
231
}
198
232
You can’t perform that action at this time.
0 commit comments