Commit 2e3fcdbe by tanghuan

开发版和正式版显示区别

1 parent b3e0e504
...@@ -138,7 +138,9 @@ class WebPage extends StatelessWidget { ...@@ -138,7 +138,9 @@ class WebPage extends StatelessWidget {
AppBar _buildAppBar(BuildContext ctx, WebState state) { AppBar _buildAppBar(BuildContext ctx, WebState state) {
return AppBar( return AppBar(
title: Text(state.title + state.testMsg, style: TextStyle(color: Color(state.titleColor), fontSize: 18)), title: EnvConfig.isDev()
? Text(state.title + state.testMsg, style: TextStyle(color: Color(state.titleColor), fontSize: 18))
: Text(state.title, style: TextStyle(color: Color(state.titleColor), fontSize: 18)),
centerTitle: true, centerTitle: true,
automaticallyImplyLeading: false, automaticallyImplyLeading: false,
backgroundColor: Color(state.bgColor), backgroundColor: Color(state.bgColor),
...@@ -350,16 +352,18 @@ class WebPage extends StatelessWidget { ...@@ -350,16 +352,18 @@ class WebPage extends StatelessWidget {
child: Center( child: Center(
child: Column( child: Column(
children: [ children: [
if (EnvConfig.isDev()) ...[
Text( Text(
EnvConfig.isDev() ? '开发版' : '正式版', '开发版',
style: TextStyle( style: TextStyle(
color: Colors.grey, color: Colors.grey,
fontSize: 14, fontSize: 14,
), ),
), ),
SizedBox(height: 4), SizedBox(height: 4),
],
Text( Text(
'Version ${Constant.appVersion}-${state.h5Version}', 'Version 1.0.0',
style: TextStyle( style: TextStyle(
color: Colors.grey, color: Colors.grey,
fontSize: 12, fontSize: 12,
...@@ -373,7 +377,15 @@ class WebPage extends StatelessWidget { ...@@ -373,7 +377,15 @@ class WebPage extends StatelessWidget {
Text( Text(
'Copyright © 中山班小二科技有限公司', 'Copyright © 中山班小二科技有限公司',
), ),
SizedBox(height: 18), SizedBox(height: 8),
Text(
'${Constant.appVersion}-${state.h5Version}',
style: TextStyle(
color: Colors.grey,
fontSize: 12,
),
),
SizedBox(height: 10),
], ],
), ),
), ),
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!