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.
 
 
 
 
 
 

304 lines
9.7 KiB

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