You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

266 lines
11 KiB

4 years ago
import 'package:flutter/material.dart';
import 'package:huixiang/generated/l10n.dart';
4 years ago
import 'package:huixiang/view_widget/my_appbar.dart';
4 years ago
import 'package:huixiang/view_widget/round_button.dart';
import 'package:huixiang/view_widget/separator.dart';
4 years ago
import 'package:flutter_screenutil/flutter_screenutil.dart';
4 years ago
class WriteOffPage extends StatefulWidget {
4 years ago
final arguments;
WriteOffPage({this.arguments});
4 years ago
@override
State<StatefulWidget> createState() {
return _WriteOffPage();
}
}
class _WriteOffPage extends State<WriteOffPage> {
@override
Widget build(BuildContext context) {
return Scaffold(
backgroundColor: Color(0xFF32A060),
4 years ago
appBar: MyAppBar(
title: S.of(context).hexiaomaxiangqing,
titleSize: 18.sp,
titleColor: Colors.white,
background: Color(0xFF32A060),
leadingColor: Colors.white,
4 years ago
),
body: Container(
alignment: Alignment.topCenter,
child: Stack(
alignment: Alignment.topCenter,
children: [
Image.asset(
"assets/image/icon_write_off_bg.png",
width: MediaQuery.of(context).size.width * 0.912,
fit: BoxFit.fill,
),
LayoutBuilder(builder: (context, constraints) {
return Container(
width: constraints.constrainWidth() * 0.912,
child: Column(
children: [
Expanded(
child: Container(
child: Column(
children: [
Text(
"马克杯兑换核销码",
style: TextStyle(
4 years ago
fontSize: 16.sp,
4 years ago
fontWeight: FontWeight.bold,
color: Color(0xFF353535)),
),
SizedBox(
height: 8,
),
Text(
"有效期:2020.01~2020.01.21",
style: TextStyle(
4 years ago
fontSize: 12.sp, color: Color(0xFF353535)),
4 years ago
),
],
mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.center,
),
alignment: Alignment.center,
),
flex: 6,
),
Container(
margin: EdgeInsets.only(left: 20, right: 20),
child: MySeparator(
width: 5,
height: 1,
color: Color(0xFFA29E9E),
),
),
Expanded(
child: Container(
alignment: Alignment.center,
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Text(
"2673 7132 6323 6786",
style: TextStyle(
fontSize: 14,
wordSpacing: 6.6,
letterSpacing: 6.6,
fontWeight: FontWeight.bold,
color: Color(0xFF353535)),
),
SizedBox(
height: 12,
),
Icon(
Icons.qr_code,
size: 72,
color: Colors.black,
),
SizedBox(
height: 16,
),
Icon(
Icons.qr_code,
size: 130,
color: Colors.black,
),
SizedBox(
height: 35,
),
InkWell(
onTap: (){
Navigator.of(context).pushNamed('/router/write_off_success_page');
},
child: Container(
child: RoundButton(
text: S.of(context).weihexiao,
textColor: Colors.white,
fontSize: 14,
fontWeight: FontWeight.bold,
backgroup: Color(0xFF32A060),
radius: 4,
padding: EdgeInsets.fromLTRB(42, 12, 42, 12),
),
width: 130,
),
)
],
),
),
flex: 28,
),
Container(
child: MySeparator(
width: 5,
height: 1,
color: Color(0xFFA29E9E),
),
margin: EdgeInsets.only(left: 20, right: 20),
),
Expanded(
child: Container(
padding: EdgeInsets.fromLTRB(20, 15, 20, 24),
child: Column(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Row(
mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Container(
width: 3,
height: 15,
margin: EdgeInsets.fromLTRB(4, 7, 4, 7),
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(3),
color: Color(0xFF20662A)),
),
Text(
S.of(context).shiyongtiaojian,
style: TextStyle(
fontWeight: FontWeight.bold,
fontSize: 14,
color: Color(0xFF353535)),
),
],
),
Row(
mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.center,
children: [
SizedBox(
width: 11,
),
Expanded(
child: Text(
S.of(context).qianwanghuixiangmendianduihuanhexiao,
style: TextStyle(
textBaseline: TextBaseline.alphabetic,
fontSize: 14,
color: Color(0xFF353535)),
),
flex: 1,
),
],
),
Row(
mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Container(
width: 3,
height: 15,
margin: EdgeInsets.fromLTRB(4, 7, 4, 7),
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(3),
color: Color(0xFF20662A)),
),
Text(
S.of(context).shiyongshuoming,
style: TextStyle(
fontWeight: FontWeight.bold,
fontSize: 14,
color: Color(0xFF353535)),
),
],
),
Row(
mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.center,
children: [
SizedBox(
width: 11,
),
Text(
S.of(context).zitiduihuanquan,
style: TextStyle(
textBaseline: TextBaseline.alphabetic,
fontSize: 14,
color: Color(0xFF353535)),
),
],
),
Row(
mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.center,
children: [
SizedBox(
width: 11,
),
Text(
S.of(context).huixiangrenyimendian,
style: TextStyle(
textBaseline: TextBaseline.alphabetic,
fontSize: 14,
color: Color(0xFF353535)),
),
],
),
],
),
),
flex: 13,
),
Expanded(
child: Container(),
flex: 3,
),
],
),
);
})
],
),
),
);
}
}