175 lines
7.7 KiB
Dart
175 lines
7.7 KiB
Dart
import 'package:flutter/material.dart';
|
||
import 'package:flutter/services.dart';
|
||
import '../../components/commonFun.dart';
|
||
import 'LoginByName2.dart';
|
||
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||
|
||
import 'LoginTabsWidget.dart';
|
||
|
||
const pageData = {
|
||
"discountStatus": 2,
|
||
"subscribeStatus": "0",
|
||
"title": "限时免费",
|
||
"subTitle": "活动时间9月1日-9月30日",
|
||
"packageList": [
|
||
{"id": 23, "desc": "月度订阅", "dealPrice": 10, "originPrice": 50, "recommand": 1},
|
||
{"id": 33, "desc": "半年订阅", "dealPrice": 56, "originPrice": 280, "recommand": 0},
|
||
{"id": 56, "desc": "年度订阅", "dealPrice": 108, "originPrice": 540, "recommand": 0}
|
||
]
|
||
};
|
||
|
||
class LoginTabs2 extends StatefulWidget {
|
||
@override
|
||
createState() => new LoginTabs2State();
|
||
}
|
||
|
||
// ScreenUtil().statusBarHeight + ScreenUtil().setHeight(144) + ScreenUtil().setHeight(348)
|
||
// + ScreenUtil().setHeight(36) + height: ScreenUtil().setHeight(166) + ScreenUtil().setHeight(17)
|
||
// + ScreenUtil().setHeight(826)
|
||
class LoginTabs2State extends State<LoginTabs2> {
|
||
@override
|
||
Widget build(BuildContext context) {
|
||
return Scaffold(
|
||
appBar: PreferredSize(child: AppBar(), preferredSize: Size.fromHeight(0)),
|
||
//使用 SingleChildScrollView 包装一下,否则键盘弹出时会报错空间溢出
|
||
body: SingleChildScrollView(
|
||
child: Column(
|
||
children: <Widget>[
|
||
Container(
|
||
height: ScreenUtil().screenHeight -
|
||
ScreenUtil().statusBarHeight -
|
||
ScreenUtil().bottomBarHeight,
|
||
width: ScreenUtil().screenWidth,
|
||
decoration: BoxDecoration(
|
||
image: DecorationImage(
|
||
image: AssetImage("assets/images/背景图.png"), fit: BoxFit.cover)),
|
||
child: Column(
|
||
mainAxisAlignment: MainAxisAlignment.start,
|
||
// alignment: WrapAlignment.center,
|
||
// crossAxisAlignment: WrapCrossAlignment.center,
|
||
// runSpacing: 9.0,
|
||
children: <Widget>[
|
||
Container(
|
||
height: ScreenUtil().setHeight(144),
|
||
//padding: EdgeInsets.only(top: ScreenUtil().setHeight(10)),
|
||
child: Row(
|
||
crossAxisAlignment: CrossAxisAlignment.start,
|
||
mainAxisAlignment: MainAxisAlignment.start,
|
||
children: <Widget>[
|
||
IconButton(
|
||
onPressed: () {
|
||
//Navigator.pop(context);
|
||
SystemNavigator.pop(); //退出App
|
||
},
|
||
icon: const Icon(Icons.close, color: Colors.white),
|
||
)
|
||
],
|
||
),
|
||
),
|
||
Center(
|
||
child: Container(
|
||
margin: EdgeInsets.only(top: ScreenUtil().setHeight(0)),
|
||
width: ScreenUtil().setWidth(490), //单位px,
|
||
height: ScreenUtil().setHeight(348),
|
||
//child: Image.asset('assets/images/user.png', fit: BoxFit.cover),
|
||
child: Image.asset('assets/images/图层 2.png', fit: BoxFit.fitHeight),
|
||
),
|
||
),
|
||
SizedBox(height: ScreenUtil().setHeight(36)),
|
||
Container(
|
||
height: ScreenUtil().setHeight(166),
|
||
margin: EdgeInsets.all(0),
|
||
child: RichText(
|
||
maxLines: 2,
|
||
textAlign: TextAlign.center,
|
||
text: TextSpan(children: [
|
||
TextSpan(
|
||
text: '宜宾黑烟车',
|
||
style: TextStyle(
|
||
fontSize: 26.0, color: Colors.white, fontWeight: FontWeight.bold)),
|
||
TextSpan(
|
||
text: '抓拍系统',
|
||
style: TextStyle(
|
||
fontSize: 26.0,
|
||
color: Color.fromRGBO(49, 216, 123, 1),
|
||
fontWeight: FontWeight.bold)),
|
||
TextSpan(
|
||
text: '\nYIBIN BLACK SMOKE CAR CAPTURE SYSTEM',
|
||
style:
|
||
TextStyle(fontSize: 11.0, color: Color.fromRGBO(101, 117, 142, 1))),
|
||
]),
|
||
),
|
||
),
|
||
SizedBox(height: ScreenUtil().setHeight(17)),
|
||
Container(
|
||
height: ScreenUtil().setHeight(945),
|
||
child: LoginTabsWidget(),
|
||
),
|
||
Container(color: Colors.transparent, height: ScreenUtil().setHeight(30)),
|
||
Container(
|
||
color: Colors.transparent,
|
||
height: ScreenUtil().setHeight(130), //不能超过133,否则有些手机会越界
|
||
child: Text(
|
||
//'© 宜宾市生态环境局\n© 四川省踏石科技有限公司 版权所有 \n服务热线:187-8467-8300',
|
||
//'© 宜宾市生态环境局\n© 四川省踏石科技有限公司',
|
||
'© 宜宾市生态环境局 四川省踏石科技 版权所有\n服务热线:187-8467-8300',
|
||
maxLines: 2,
|
||
textAlign: TextAlign.center,
|
||
style: TextStyle(
|
||
fontSize: 16.0,
|
||
color: Color.fromRGBO(106, 144, 204, 1),
|
||
fontWeight: FontWeight.bold),
|
||
),
|
||
),
|
||
|
||
//144
|
||
// 384
|
||
// 36
|
||
// 166
|
||
// 17
|
||
// 1026
|
||
// 1573
|
||
|
||
// 1768
|
||
//S7采用5.1英寸的Super AMOLED屏幕,分辨率为2560 ×1440(Quad HD),设置为1920*1080
|
||
// Wrap(
|
||
// runSpacing: 9.0,
|
||
// alignment: WrapAlignment.center,
|
||
// children: <Widget>[
|
||
// Row(
|
||
// crossAxisAlignment: CrossAxisAlignment.center,
|
||
// mainAxisAlignment: MainAxisAlignment.center,
|
||
// children: <Widget>[
|
||
// Text('${pageData['title']}',
|
||
// style: TextStyle(fontSize: 38.0, color: Color.fromRGBO(234, 200, 134, 1)))
|
||
// ],
|
||
// ),
|
||
// //自定义圆角
|
||
// ClipRRect(
|
||
// borderRadius: BorderRadius.circular(12.5),
|
||
// child: Container(
|
||
// height: 25.0,
|
||
// width: 190.0,
|
||
// color: Color.fromRGBO(234, 200, 134, 1),
|
||
// child: Row(
|
||
// crossAxisAlignment: CrossAxisAlignment.center,
|
||
// mainAxisAlignment: MainAxisAlignment.center,
|
||
// children: <Widget>[
|
||
// Text(
|
||
// '${pageData['subTitle']}',
|
||
// textAlign: TextAlign.center,
|
||
// style: TextStyle(color: Color.fromRGBO(113, 80, 24, 1)),
|
||
// )
|
||
// ])))
|
||
// ],
|
||
// )
|
||
],
|
||
),
|
||
),
|
||
],
|
||
),
|
||
),
|
||
);
|
||
}
|
||
}
|