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.
 
 
 
 
 
 

309 lines
11 KiB

import 'package:flutter/material.dart';
import 'package:huixiang/generated/l10n.dart';
class ExchangeOrderPage extends StatefulWidget {
@override
State<StatefulWidget> createState() {
return _ExchangeOrderPage();
}
}
class _ExchangeOrderPage extends State<ExchangeOrderPage> {
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: Text(
S.of(context).dingdanqueren,
style: TextStyle(
color: Colors.black,
fontWeight: FontWeight.bold,
fontSize: 18,
),
),
centerTitle: false,
backgroundColor: Color(0xFFFAFAFA),
elevation: 0,
leading: GestureDetector(
onTap: () {
Navigator.of(context).pop();
},
child: Container(
alignment: Alignment.centerRight,
margin: EdgeInsets.only(left: 10),
padding: EdgeInsets.all(6),
child: Icon(
Icons.arrow_back_ios,
color: Colors.black,
size: 24,
),
),
),
titleSpacing: 2,
leadingWidth: 56,
),
body: Column(
children: [
Expanded(
child: Column(
children: [
Container(
margin:
EdgeInsets.only(left: 16, right: 16, top: 26, bottom: 8),
padding: EdgeInsets.all(20),
decoration: BoxDecoration(
color: Colors.white,
boxShadow: [
BoxShadow(
color: Colors.black.withAlpha(12),
offset: Offset(0, 3),
blurRadius: 14,
spreadRadius: 0)
],
borderRadius: BorderRadius.all(Radius.circular(8)),
),
child: Column(
children: [
Row(
children: [
Image.asset(
"assets/image/icon_order_exchange_info.png",
width: 24,
height: 24,
),
SizedBox(width: 4),
Text(
S.of(context).duihuanxinxi,
style: TextStyle(
fontWeight: FontWeight.bold,
fontSize: 16,
color: Color(0xFF353535)),
),
],
),
SizedBox(
height: 18,
),
Row(
children: [
Text(
S.of(context).lingqufangshi,
style:
TextStyle(fontSize: 14, color: Color(0xFF353535)),
),
SizedBox(
width: 12,
),
Text(
S.of(context).ziti,
style:
TextStyle(fontSize: 14, color: Color(0xFF353535)),
),
],
),
SizedBox(
height: 13,
),
Row(
children: [
Text(
S.of(context).zitidizhi,
style:
TextStyle(fontSize: 14, color: Color(0xFF353535)),
),
SizedBox(
width: 12,
),
GestureDetector(
onTap: () {
Navigator.of(context)
.pushNamed('/router/store_selector_page');
},
child: Text(
S.of(context).qingxuanzhemendian,
style: TextStyle(
fontSize: 14, color: Color(0xFF32A060)),
),
),
Icon(
Icons.keyboard_arrow_right,
size: 16,
color: Color(0xFF32A060),
)
],
),
SizedBox(
height: 12,
),
Row(
children: [
Text(
S.of(context).zitishijian,
style:
TextStyle(fontSize: 14, color: Color(0xFF353535)),
),
SizedBox(
width: 12,
),
Text(
S.of(context).duihuanhouwugegongzuori,
style:
TextStyle(fontSize: 14, color: Color(0xFF353535)),
),
],
),
],
),
),
Container(
margin:
EdgeInsets.only(left: 16, right: 16, top: 8, bottom: 16),
padding: EdgeInsets.all(20),
decoration: BoxDecoration(
color: Colors.white,
boxShadow: [
BoxShadow(
color: Colors.black.withAlpha(12),
offset: Offset(0, 3),
blurRadius: 14,
spreadRadius: 0)
],
borderRadius: BorderRadius.all(Radius.circular(8)),
),
child: Column(
children: [
Row(
children: [
Image.asset(
"assets/image/icon_order_commodity_info.png",
width: 24,
height: 24,
),
SizedBox(width: 4),
Text(
S.of(context).duihuanshangpinxiangqing,
style: TextStyle(
fontWeight: FontWeight.bold,
fontSize: 16,
color: Color(0xFF353535)),
),
],
),
SizedBox(
height: 18,
),
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Image.network(
"https://t7.baidu.com/it/u=136439029,1848397702&fm=193&f=GIF",
fit: BoxFit.cover,
width: 80,
height: 80,
),
Column(
mainAxisAlignment: MainAxisAlignment.end,
crossAxisAlignment: CrossAxisAlignment.end,
children: [
Text(
"马克杯",
style: TextStyle(
fontSize: 14,
fontWeight: FontWeight.bold,
color: Color(0xFF353535)),
),
SizedBox(
height: 4,
),
Text(
"x1",
style: TextStyle(
fontSize: 12, color: Color(0xFF727272)),
),
],
)
],
),
SizedBox(
height: 12,
),
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Text(
"商品积分",
style:
TextStyle(fontSize: 14, color: Color(0xFF353535)),
),
SizedBox(
width: 12,
),
Text(
S.of(context).jifen_(99),
style: TextStyle(
fontSize: 12,
color: Colors.black,
),
),
],
),
SizedBox(
height: 12,
),
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Text(
"实付积分",
style:
TextStyle(fontSize: 14, color: Color(0xFF353535)),
),
SizedBox(
width: 12,
),
Text(
S.of(context).jifen_(99),
style:
TextStyle(fontSize: 12, color: Color(0xFF32A060)),
),
],
),
],
),
),
],
)),
GestureDetector(
onTap: () {
if (!storeIsSelected) return;
Navigator.of(context).pushNamed('/router/exchange_order_success_page');
},
child: Container(
padding: EdgeInsets.only(top: 16, bottom: 16),
decoration: BoxDecoration(
color: MaterialStateColor.resolveWith((states) =>
storeIsSelected ? Color(0xFF32A060) : Color(0xFFD8D8D8)),
borderRadius: BorderRadius.only(
topLeft: Radius.circular(4),
topRight: Radius.circular(4))),
alignment: Alignment.center,
child: Text(
S.of(context).querenduihuan,
style: TextStyle(
fontSize: 16,
color: MaterialStateColor.resolveWith((states) =>
storeIsSelected ? Colors.white : Color(0xFFA0A0A0)),
fontWeight: FontWeight.bold),
),
),
),
],
),
);
}
var storeIsSelected = true;
}