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.

270 lines
8.6 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
class LogisticsInformationPage extends StatefulWidget {
@override
State<StatefulWidget> createState() {
return _LogisticsInformationPage();
}
}
class _LogisticsInformationPage extends State<LogisticsInformationPage> {
@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(
height: 16,
),
4 years ago
Container(
margin: EdgeInsets.symmetric(vertical: 8, horizontal: 16),
padding: EdgeInsets.all(16),
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.only(
topLeft: Radius.circular(8),
bottomLeft: Radius.circular(4),
topRight: Radius.circular(8),
bottomRight: Radius.circular(4),
4 years ago
),
4 years ago
boxShadow: [
BoxShadow(
color: Colors.black.withAlpha(12),
offset: Offset(0, 2),
blurRadius: 14,
spreadRadius: 0)
],
),
child: Column(
4 years ago
crossAxisAlignment: CrossAxisAlignment.start,
children: [
4 years ago
Padding(padding:EdgeInsets.only(bottom: 32),
child:Text("订单跟踪",style: TextStyle(fontSize:16,fontWeight: FontWeight.bold,color: Color(0xff353535)),),),
SizedBox(
height: 500,
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
],
),
),
4 years ago
4 years ago
),
);
}
Widget _orderInformation() {
4 years ago
return Container(
margin: EdgeInsets.only(left: 16,right: 16),
4 years ago
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,
height: 95,
fit: BoxFit.cover,
),
Container(
4 years ago
padding: EdgeInsets.only(left: 32,right: 32,top: 5,bottom:5),
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
"共3件",
4 years ago
style:TextStyle(
4 years ago
fontSize: 12,
color: Colors.white,
),
),
),
],
),
SizedBox(
width: 12,
),
Expanded(
flex: 1,
child: Container(
height: 95,
child: Column(
mainAxisAlignment: MainAxisAlignment.spaceAround,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Row(
children: [
Text(
"物流状态:",
style: TextStyle(
color: Color(0xff353535),
fontSize: 14,
),
),
Text(
"已发货",
style: TextStyle(
color: Color(0xFF32A060),
fontSize: 14,
4 years ago
fontWeight: FontWeight.bold
),
4 years ago
)
],
),
SizedBox(
height: 8,
),
Row(
children: [
Text(
"物流公司:",
style: TextStyle(
color: Color(0xff353535),
fontSize: 14,
),
),
Text(
"圆通快递",
style: TextStyle(
color: Colors.black,
fontSize: 14,
),
)
],
),
SizedBox(
height: 8,
),
Row(
children: [
Text(
"物流单号:",
style: TextStyle(
color: Color(0xff353535),
fontSize: 14,
),
),
Text(
"1234567890412",
style: TextStyle(
color: Colors.black,
fontSize: 14,
),
)
],
),
],
),
),
)
],
),
],
),
);
4 years ago
}
4 years ago
Widget orderTrackItem(var position) {
4 years ago
return Row(
children: [
Column(
children: [
Text("11-27",style: TextStyle(fontSize:14,fontWeight: FontWeight.bold,color: Color(0xff353535)),),
SizedBox(
height:5,
),
Text("12:23",style: TextStyle(fontSize:12,color: Color(0xff868686)),),
],
),
SizedBox(
width: 28,
),
Column(
children: [
Image.asset(
"assets/image/icon_sign.png",
width: 24,
height: 24,
),
Container(
width: 1,
height: 30,
decoration: new BoxDecoration(
color: position < 7 ? Colors.black : Colors.white,
4 years ago
),
4 years ago
)
],
),
SizedBox(
width: 28,
),
Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text("已签收",style: TextStyle(fontSize:14,fontWeight: FontWeight.bold,color: Colors.black),),
SizedBox(
height: 10,
),
Row(
children: [
Text("快件已在泉州市签收",style: TextStyle(fontSize:12,color: Color(0xff353535)),),
SizedBox(
width: 9,
4 years ago
),
4 years ago
Text("签收人 张三",style: TextStyle(fontSize:12,color: Color(0xff353535)),),
],
),
],
),
],
4 years ago
);
4 years ago
}
4 years ago
4 years ago
}