hyzp_ybqx-Commit001:代码刚转换好,编译通过
This commit is contained in:
@@ -0,0 +1,139 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import '../../../components/commonFun.dart';
|
||||
|
||||
import '../../../widget/JdButton.dart';
|
||||
import '../../../components/commonFun.dart';
|
||||
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||||
|
||||
class MyAbout extends StatefulWidget {
|
||||
MyAbout({Key key, this.ver, this.date}) : super(key: key);
|
||||
String ver = '1.0.0';
|
||||
String date = '';
|
||||
|
||||
_LoginPageState createState() => _LoginPageState();
|
||||
}
|
||||
|
||||
class _LoginPageState extends State<MyAbout> {
|
||||
var _username = new TextEditingController();
|
||||
|
||||
void initState() {
|
||||
// TODO: implement initState
|
||||
super.initState();
|
||||
}
|
||||
|
||||
//监听登录页面销毁的事件
|
||||
dispose() {
|
||||
super.dispose();
|
||||
}
|
||||
|
||||
doLogin() async {
|
||||
//临时跳转
|
||||
//Navigator.pushNamed(context, '/tabs', arguments: g_iIndex);
|
||||
Navigator.pop(context); //返回
|
||||
return;
|
||||
}
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
appBar: PreferredSize(
|
||||
preferredSize: Size.fromHeight(ScreenUtil().setHeight(173)), // 设置appBar高度
|
||||
// 设置appBar高度
|
||||
child: AppBar(
|
||||
automaticallyImplyLeading: false,
|
||||
centerTitle: true,
|
||||
titleSpacing: 0.0,
|
||||
//设置title的左边距
|
||||
flexibleSpace: Container(
|
||||
//SizedBox(height: ScreenUtil().statusBarHeight), //显示顶部状态栏
|
||||
// SizedBox(height: ScreenUtil().setHeight(10)), //显示顶部状态栏
|
||||
padding: EdgeInsets.only(top: ScreenUtil().statusBarHeight), //留出顶部状态栏高度
|
||||
child: Container(
|
||||
//height: ScreenUtil().setHeight(173),
|
||||
decoration: BoxDecoration(
|
||||
gradient: LinearGradient(
|
||||
begin: Alignment.centerLeft,
|
||||
end: Alignment.centerRight,
|
||||
colors: [
|
||||
Color.fromRGBO(12, 186, 156, 1),
|
||||
Color.fromRGBO(39, 127, 235, 1),
|
||||
],
|
||||
),
|
||||
),
|
||||
// decoration: BoxDecoration(
|
||||
// gradient: LinearGradient(colors: [
|
||||
// Color(0xFF0018EB),
|
||||
// Color(0xFF01C1D9),
|
||||
// ], begin: Alignment.bottomCenter, end: Alignment.topCenter),
|
||||
// ),
|
||||
),
|
||||
),
|
||||
title: Padding(
|
||||
padding: EdgeInsets.only(left: 0, right: 0),
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.start,
|
||||
children: [
|
||||
getIconAndTextButton(
|
||||
iconColor: Colors.white,
|
||||
iconData: Icons.chevron_left_outlined,
|
||||
onPress: () {
|
||||
Navigator.pop(context);
|
||||
},
|
||||
),
|
||||
Expanded(
|
||||
child: Text("关于",
|
||||
style: TextStyle(color: Colors.white, fontSize: 20),
|
||||
textAlign: TextAlign.center,
|
||||
overflow: TextOverflow.ellipsis),
|
||||
),
|
||||
SizedBox(width: 50),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
body: Container(
|
||||
padding: EdgeInsets.only(top: 20, bottom: 20, left: 5, right: 5),
|
||||
child: ListView(
|
||||
children: <Widget>[
|
||||
Center(
|
||||
child: Container(
|
||||
margin: EdgeInsets.only(top: 30),
|
||||
height: ScreenUtil().setWidth(160),
|
||||
width: ScreenUtil().setWidth(160),
|
||||
//child: Image.asset('assets/images/user.png', fit: BoxFit.cover),
|
||||
child: Image.asset('assets/images/ybsthbj.png', fit: BoxFit.fitHeight),
|
||||
// child: Image.network(
|
||||
// 'https://www.itying.com/images/flutter/list5.jpg',
|
||||
// fit: BoxFit.cover),
|
||||
),
|
||||
),
|
||||
Center(
|
||||
child: Column(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: <Widget>[
|
||||
SizedBox(height: 60),
|
||||
Text('宜宾市黑烟车电子抓拍系统', style: TextStyle(fontSize: 20)),
|
||||
Text('v${widget.ver}(${widget.date})', style: TextStyle(fontSize: 20)),
|
||||
SizedBox(height: 60),
|
||||
Text('© 宜宾市生态环境局 四川省踏石科技 版权所有\n服务热线:187-8467-8300',
|
||||
maxLines: 2, style: TextStyle(fontSize: 16), textAlign: TextAlign.center),
|
||||
],
|
||||
),
|
||||
),
|
||||
SizedBox(height: 100),
|
||||
Container(
|
||||
padding: EdgeInsets.only(top: 20, bottom: 20, left: 20, right: 20),
|
||||
child: JdButton(
|
||||
height: 126,
|
||||
text: "确认",
|
||||
color: Colors.blueAccent,
|
||||
onTop: doLogin,
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user