|
1 | 1 | import 'package:flutter/material.dart'; |
2 | 2 | import 'package:efox_flutter/store/index.dart' show Store; |
3 | | -import 'header.dart' as Header; |
| 3 | +import 'headerComp.dart' as Header; |
4 | 4 | import 'package:efox_flutter/components/markdownComp.dart' as MarkDownComp; |
5 | 5 | import 'package:efox_flutter/lang/index.dart' show AppLocalizations; |
6 | 6 | import 'package:efox_flutter/components/baseComp.dart' as BaseComp; |
7 | 7 | import 'package:efox_flutter/components/exampleComp.dart' as ExampleComp; |
8 | | -import 'package:efox_flutter/components/nodemo.dart' as NoDemo; |
| 8 | +import 'package:efox_flutter/components/updatingComp.dart' as UpdatingComp; |
9 | 9 | import 'package:efox_flutter/utils/file.dart' as FileUtils; |
10 | 10 | import 'package:efox_flutter/utils/loadAsset.dart' as LoadAssetUtils; |
11 | 11 | import 'package:efox_flutter/router/index.dart' show FluroRouter; |
@@ -62,19 +62,17 @@ class IndexState extends State<Index> { |
62 | 62 |
|
63 | 63 | void init() async { |
64 | 64 | this._bodyList.length = 0; |
65 | | - if (this.demoChild.length != 0) { |
| 65 | + if (this.demoChild != null && this.demoChild.length != 0) { |
| 66 | + // markdown text |
66 | 67 | this |
67 | 68 | ._bodyList |
68 | 69 | .add(await MarkDownComp.Index(await this.getMdFile(this.mdUrl))); |
69 | | - |
70 | | - // 增加 |
71 | | - if (this.demoChild != null) { |
72 | | - this.demoChild.forEach((Widget item) { |
73 | | - this._bodyList.add(ExampleComp.Index(child: item)); |
74 | | - }); |
75 | | - } |
| 70 | + // demo |
| 71 | + this.demoChild.forEach((Widget item) { |
| 72 | + this._bodyList.add(ExampleComp.Index(child: item)); |
| 73 | + }); |
76 | 74 | } else { |
77 | | - this._bodyList.add(NoDemo.Index()); |
| 75 | + this._bodyList.add(UpdatingComp.Index()); |
78 | 76 | } |
79 | 77 |
|
80 | 78 | setState(() { |
@@ -140,14 +138,14 @@ class IndexState extends State<Index> { |
140 | 138 | ); |
141 | 139 | }, |
142 | 140 | ), |
143 | | - IconButton( |
144 | | - icon: Icon( |
145 | | - Icons.code, |
146 | | - ), |
147 | | - onPressed: () async { |
148 | | - this.openPage(context); |
149 | | - }, |
150 | | - ), |
| 141 | + // IconButton( |
| 142 | + // icon: Icon( |
| 143 | + // Icons.code, |
| 144 | + // ), |
| 145 | + // onPressed: () async { |
| 146 | + // this.openPage(context); |
| 147 | + // }, |
| 148 | + // ), |
151 | 149 | IconButton( |
152 | 150 | icon: Icon(Icons.share), |
153 | 151 | onPressed: () { |
|
0 commit comments