File tree Expand file tree Collapse file tree 2 files changed +39
-7
lines changed Expand file tree Collapse file tree 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> {
6464 this ._bodyList.length = 0 ;
6565 String mdText = await this .getMdFile (this .mdUrl);
6666 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));
7068 // demo
7169 if (this .demoChild != null && this .demoChild.length > 0 ) {
7270 this .demoChild.forEach ((Widget item) {
@@ -87,9 +85,9 @@ class IndexState extends State<Index> {
8785 this .model = model;
8886 return Scaffold (
8987 appBar: AppBar (
90- title: Header .Index (
88+ /* title: Header.Index(
9189 this.title,
92- ),
90+ ), */
9391 actions: this .getActions (
9492 context,
9593 ),
Original file line number Diff line number Diff line change @@ -128,7 +128,41 @@ class _IndexState extends State<Index> {
128128
129129 @override
130130 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(
132166 child: Column(
133167 children: <Widget>[
134168 Container(
@@ -192,7 +226,7 @@ class _IndexState extends State<Index> {
192226 ),
193227 ],
194228 ),
195- );
229+ ); */
196230 }
197231}
198232
You can’t perform that action at this time.
0 commit comments