Skip to content

Commit 6e2455e

Browse files
committed
Merge branch 'test' of https://github.com/efoxTeam/flutter-ui into test
2 parents 6ac86c0 + ff4b9b2 commit 6e2455e

File tree

5 files changed

+15
-2
lines changed

5 files changed

+15
-2
lines changed

lib/components/widgetComp.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ class Index extends StatelessWidget {
3535
'/webview?url=${Uri.encodeComponent(model.configInfo.assetOrigin + url)}');
3636
} else {
3737
// 加载本地
38-
String mdStr = await FileUtils.readLocaleFile(this.mdUrl);
38+
String mdStr = await FileUtils.readLocaleFile(url);
3939
Navigator.of(context).push(
4040
MaterialPageRoute(builder: (BuildContext context) {
4141
return BaseComp.Index(

lib/config/development.dart

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
class Config {
2+
3+
}

lib/config/index.dart

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
import 'development.dart' as Development;
2+
import 'production.dart' as Production;
3+
4+
const bool isPro = false;
5+
6+
Object env = isPro ? Production.Config : Development.Config;

lib/config/production.dart

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
class Config {
2+
3+
}

lib/store/models/config_state_model.dart

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
import 'package:scoped_model/scoped_model.dart';
2+
import 'package:efox_flutter/config/index.dart' as Config;
23

34
class ConfigInfo {
4-
bool isPro = false;
5+
bool isPro = Config.isPro;
56
String origin = 'https://github.com/efoxTeam/flutter-ui/blob/master/docs/widget/scrollview/gridview/code.md';
67
String assetOrigin = 'https://github.com/efoxTeam/flutter-ui/blob/master/';
78
}

0 commit comments

Comments
 (0)