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.

305 lines
9.7 KiB

4 years ago
import 'package:flutter/material.dart';
4 years ago
import 'package:flutter/rendering.dart';
4 years ago
import 'package:huixiang/generated/l10n.dart';
4 years ago
import 'package:huixiang/view_widget/my_appbar.dart';
4 years ago
import 'package:flutter_screenutil/flutter_screenutil.dart';
4 years ago
class LogisticsInformationPage extends StatefulWidget {
@override
State<StatefulWidget> createState() {
return _LogisticsInformationPage();
}
}
class _LogisticsInformationPage extends State<LogisticsInformationPage> {
4 years ago
@override
void initState() {
super.initState();
}
4 years ago
@override
Widget build(BuildContext context) {
return Scaffold(
4 years ago
appBar: MyAppBar(
background: Color(0xFFF7F7F7),
title: S.of(context).wuliuxinxi,
titleColor: Colors.black,
leadingColor: Colors.black,
4 years ago
),
4 years ago
body: Container(
4 years ago
child: SingleChildScrollView(
physics: BouncingScrollPhysics(),
4 years ago
child: Column(
4 years ago
children: [
_orderInformation(),
SizedBox(
4 years ago
height: 16.h,
4 years ago
),
4 years ago
Container(
4 years ago
margin: EdgeInsets.symmetric(
vertical: 8.h,
horizontal: 16.w,
),
4 years ago
padding: EdgeInsets.all(16),
decoration: BoxDecoration(
color: Colors.white,
4 years ago
borderRadius: BorderRadius.vertical(
top: Radius.circular(8.w),
bottom: Radius.circular(4.w),
4 years ago
),
4 years ago
boxShadow: [
BoxShadow(
4 years ago
color: Colors.black.withAlpha(12),
offset: Offset(0, 2),
blurRadius: 14,
spreadRadius: 0,
)
4 years ago
],
),
child: Column(
4 years ago
crossAxisAlignment: CrossAxisAlignment.start,
children: [
4 years ago
Padding(
padding: EdgeInsets.only(bottom: 32.h),
child: Text(
S.of(context).dingdangenzong,
style: TextStyle(
fontSize: 16.sp,
fontWeight: FontWeight.bold,
color: Color(0xff353535)),
4 years ago
),
),
4 years ago
SizedBox(
4 years ago
height: 500.h,
4 years ago
child: ListView.builder(
itemCount: 8,
scrollDirection: Axis.vertical,
physics: BouncingScrollPhysics(),
itemBuilder: (context, position) {
return orderTrackItem(position);
},
4 years ago
),
4 years ago
),
4 years ago
]),
4 years ago
),
4 years ago
],
),
),
),
);
}
Widget _orderInformation() {
4 years ago
return Container(
margin: EdgeInsets.only(left: 16.w, right: 16.w),
4 years ago
padding: EdgeInsets.all(16),
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.circular(4),
boxShadow: [
BoxShadow(
4 years ago
color: Colors.black.withAlpha(12),
offset: Offset(0, 2),
blurRadius: 14,
spreadRadius: 0,
)
4 years ago
],
),
child: Column(
children: [
Row(
mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Stack(
alignment: Alignment.bottomCenter,
children: [
Image.network(
"https://t7.baidu.com/it/u=810585695,3039658333&fm=193&f=GIF",
4 years ago
width: 95.w,
height: 95.h,
4 years ago
fit: BoxFit.cover,
),
Container(
4 years ago
padding: EdgeInsets.only(
4 years ago
left: 32.w, right: 32.w, top: 5.h, bottom: 5.h),
4 years ago
decoration: BoxDecoration(
4 years ago
borderRadius: BorderRadius.only(
topLeft: Radius.circular(0),
bottomLeft: Radius.circular(4),
topRight: Radius.circular(0),
bottomRight: Radius.circular(4),
),
color: Color(0x53000000),
),
4 years ago
child: Text(
4 years ago
S.of(context).gongjijian(3),
4 years ago
style: TextStyle(
fontSize: 12.sp,
4 years ago
fontWeight: FontWeight.w400,
4 years ago
color: Colors.white,
),
),
),
],
),
SizedBox(
4 years ago
width: 12.w,
4 years ago
),
Expanded(
flex: 1,
child: Container(
4 years ago
height: 95.h,
4 years ago
child: Column(
mainAxisAlignment: MainAxisAlignment.spaceAround,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Row(
children: [
Text(
4 years ago
S.of(context).wuliuzhuangtai,
4 years ago
style: TextStyle(
4 years ago
color: Color(0xff353535),
fontSize: 14.sp,
fontWeight: FontWeight.w400),
4 years ago
),
Text(
4 years ago
S.of(context).yifahuo,
4 years ago
style: TextStyle(
color: Color(0xFF32A060),
4 years ago
fontSize: 14.sp,
fontWeight: FontWeight.bold),
4 years ago
)
],
),
SizedBox(
4 years ago
height: 8.h,
4 years ago
),
Row(
children: [
Text(
4 years ago
S.of(context).wuliugongsi,
4 years ago
style: TextStyle(
color: Color(0xff353535),
4 years ago
fontSize: 14.sp,
4 years ago
),
),
Text(
"圆通快递",
style: TextStyle(
4 years ago
color: Colors.black,
fontSize: 14.sp,
fontWeight: FontWeight.w400),
4 years ago
)
],
),
SizedBox(
4 years ago
height: 8.h,
4 years ago
),
Row(
children: [
Text(
4 years ago
S.of(context).wuliudanhao,
4 years ago
style: TextStyle(
4 years ago
color: Color(0xff353535),
fontSize: 14.sp,
fontWeight: FontWeight.w400),
4 years ago
),
Text(
"1234567890412",
style: TextStyle(
4 years ago
color: Colors.black,
fontSize: 14.sp,
fontWeight: FontWeight.w400),
4 years ago
)
],
),
],
),
),
)
],
),
],
),
);
4 years ago
}
4 years ago
Widget orderTrackItem(var position) {
4 years ago
return Row(
children: [
Column(
children: [
4 years ago
Text(
"11-27",
style: TextStyle(
4 years ago
fontSize: 14.sp,
fontWeight: FontWeight.w500,
color: Color(0xff353535)),
4 years ago
),
4 years ago
SizedBox(
4 years ago
height: 5.h,
),
Text(
"12:23",
4 years ago
style: TextStyle(fontSize: 12.sp, fontWeight: FontWeight.w500, color: Color(0xff868686)),
4 years ago
),
],
),
SizedBox(
4 years ago
width: 28.w,
4 years ago
),
Column(
children: [
Image.asset(
"assets/image/icon_sign.png",
4 years ago
width: 24.w,
height: 24.h,
4 years ago
),
Container(
4 years ago
width: 1.w,
height: 30.h,
4 years ago
decoration: new BoxDecoration(
color: position < 7 ? Colors.black : Colors.white,
4 years ago
),
4 years ago
)
],
),
SizedBox(
4 years ago
width: 28.w,
4 years ago
),
Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
4 years ago
Text(
4 years ago
S.of(context).yiqianshou,
4 years ago
style: TextStyle(
4 years ago
fontSize: 14.sp,
fontWeight: FontWeight.w500,
color: Colors.black),
4 years ago
),
4 years ago
SizedBox(
4 years ago
height: 10.h,
4 years ago
),
Row(
children: [
4 years ago
Text(
"快件已在泉州市签收",
4 years ago
style: TextStyle(fontSize: 12.sp, fontWeight: FontWeight.w400, color: Color(0xff353535)),
4 years ago
),
4 years ago
SizedBox(
4 years ago
width: 9.w,
),
Text(
"签收人 张三",
4 years ago
style: TextStyle(fontSize: 12.sp, fontWeight: FontWeight.w400, color: Color(0xff353535)),
4 years ago
),
4 years ago
],
),
],
),
],
4 years ago
);
4 years ago
}
4 years ago
}