|
|
|
@ -22,6 +22,8 @@ class _DashboardScreenState extends State<DashboardScreen> {
|
|
|
|
|
Scaffold(
|
|
|
|
|
backgroundColor: Color(0xffF4F9FA),
|
|
|
|
|
body: Column(
|
|
|
|
|
// mainAxisAlignment: MainAxisAlignment.center,
|
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.center,
|
|
|
|
|
children: <Widget>[
|
|
|
|
|
Row(
|
|
|
|
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
|
|
|
@ -30,152 +32,171 @@ class _DashboardScreenState extends State<DashboardScreen> {
|
|
|
|
|
padding: EdgeInsets.all(16.0),
|
|
|
|
|
child: Column(
|
|
|
|
|
children: <Widget>[
|
|
|
|
|
Column(
|
|
|
|
|
mainAxisAlignment: MainAxisAlignment.start,
|
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
|
children: <Widget>[
|
|
|
|
|
Text(
|
|
|
|
|
'Have a great day ,',
|
|
|
|
|
style: TextStyle(fontSize: 12.5),
|
|
|
|
|
),
|
|
|
|
|
Padding(
|
|
|
|
|
padding: EdgeInsets.only(top: 4.5),
|
|
|
|
|
child: Text(
|
|
|
|
|
'Driver Name',
|
|
|
|
|
style: TextStyle(
|
|
|
|
|
fontWeight: FontWeight.w400, fontSize: 25.0),
|
|
|
|
|
SafeArea(
|
|
|
|
|
child: Column(
|
|
|
|
|
mainAxisAlignment: MainAxisAlignment.start,
|
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
|
children: <Widget>[
|
|
|
|
|
Text(
|
|
|
|
|
'Have a great day ,',
|
|
|
|
|
style: TextStyle(fontSize: 12.5),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
Padding(
|
|
|
|
|
padding: EdgeInsets.only(top: 4.5),
|
|
|
|
|
child: Text(
|
|
|
|
|
'Driver Name',
|
|
|
|
|
style: TextStyle(
|
|
|
|
|
fontWeight: FontWeight.w400,
|
|
|
|
|
fontSize: 25.0),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
Padding(
|
|
|
|
|
padding: EdgeInsets.all(16.0),
|
|
|
|
|
child: Column(
|
|
|
|
|
children: <Widget>[
|
|
|
|
|
CircleAvatar(
|
|
|
|
|
radius: 25.5,
|
|
|
|
|
backgroundColor: Color(0xff30B7B9),
|
|
|
|
|
child: CircleAvatar(
|
|
|
|
|
child: SafeArea(
|
|
|
|
|
child: Column(
|
|
|
|
|
children: <Widget>[
|
|
|
|
|
CircleAvatar(
|
|
|
|
|
radius: 25.5,
|
|
|
|
|
backgroundColor: Color(0xff30B7B9),
|
|
|
|
|
maxRadius: 26.0,
|
|
|
|
|
child: Image.asset(
|
|
|
|
|
'assets/images/driver.png',
|
|
|
|
|
fit: BoxFit.contain,
|
|
|
|
|
child: CircleAvatar(
|
|
|
|
|
backgroundColor: Color(0xff30B7B9),
|
|
|
|
|
maxRadius: 26.0,
|
|
|
|
|
child: Image.asset(
|
|
|
|
|
'assets/images/driver.png',
|
|
|
|
|
fit: BoxFit.contain,
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
Row(
|
|
|
|
|
children: <Widget>[
|
|
|
|
|
Column(
|
|
|
|
|
children: <Widget>[
|
|
|
|
|
Padding(
|
|
|
|
|
padding: EdgeInsets.symmetric(horizontal: 12.0),
|
|
|
|
|
child: Container(
|
|
|
|
|
height: MediaQuery.of(context).size.height * 0.15,
|
|
|
|
|
width: MediaQuery.of(context).size.width * 0.43,
|
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
|
borderRadius: BorderRadius.circular(12.0),
|
|
|
|
|
gradient: LinearGradient(
|
|
|
|
|
colors: [Color(0xff17AFB8), Color(0xff49C1BC)]),
|
|
|
|
|
),
|
|
|
|
|
child: Row(
|
|
|
|
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
|
|
|
|
children: <Widget>[
|
|
|
|
|
Padding(
|
|
|
|
|
padding: EdgeInsets.all(12.0),
|
|
|
|
|
child: Column(
|
|
|
|
|
mainAxisAlignment:
|
|
|
|
|
MainAxisAlignment.spaceEvenly,
|
|
|
|
|
children: <Widget>[
|
|
|
|
|
Text(
|
|
|
|
|
'You Have',
|
|
|
|
|
style: TextStyle(
|
|
|
|
|
color: Colors.white, fontSize: 10.0),
|
|
|
|
|
),
|
|
|
|
|
Text(
|
|
|
|
|
'5',
|
|
|
|
|
style: TextStyle(
|
|
|
|
|
color: Colors.white, fontSize: 25.0),
|
|
|
|
|
),
|
|
|
|
|
Text(
|
|
|
|
|
'Undelivered \n Packages',
|
|
|
|
|
style: TextStyle(
|
|
|
|
|
color: Colors.white, fontSize: 10.0),
|
|
|
|
|
)
|
|
|
|
|
],
|
|
|
|
|
Expanded(
|
|
|
|
|
child: Column(
|
|
|
|
|
children: <Widget>[
|
|
|
|
|
Padding(
|
|
|
|
|
padding: EdgeInsets.symmetric(horizontal: 10.0),
|
|
|
|
|
child: Container(
|
|
|
|
|
height: MediaQuery.of(context).size.height * 0.15,
|
|
|
|
|
width: MediaQuery.of(context).size.width * 0.44,
|
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
|
borderRadius: BorderRadius.circular(15.0),
|
|
|
|
|
gradient: LinearGradient(
|
|
|
|
|
colors: [Color(0xff17AFB8), Color(0xff49C1BC)]),
|
|
|
|
|
),
|
|
|
|
|
child: Row(
|
|
|
|
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
|
|
|
|
children: <Widget>[
|
|
|
|
|
Padding(
|
|
|
|
|
padding: EdgeInsets.all(10.0),
|
|
|
|
|
child: Column(
|
|
|
|
|
mainAxisAlignment:
|
|
|
|
|
MainAxisAlignment.spaceBetween,
|
|
|
|
|
children: <Widget>[
|
|
|
|
|
Text(
|
|
|
|
|
'You Have',
|
|
|
|
|
style: TextStyle(
|
|
|
|
|
color: Colors.white, fontSize: 10.0),
|
|
|
|
|
),
|
|
|
|
|
Text(
|
|
|
|
|
'5',
|
|
|
|
|
style: TextStyle(
|
|
|
|
|
color: Colors.white, fontSize: 25.0),
|
|
|
|
|
),
|
|
|
|
|
Expanded(
|
|
|
|
|
child: Text(
|
|
|
|
|
'Undelivered \n Packages',
|
|
|
|
|
style: TextStyle(
|
|
|
|
|
color: Colors.white,
|
|
|
|
|
fontSize: 10.0),
|
|
|
|
|
),
|
|
|
|
|
)
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
Padding(
|
|
|
|
|
padding: EdgeInsets.all(4.0),
|
|
|
|
|
child: Column(
|
|
|
|
|
mainAxisAlignment: MainAxisAlignment.center,
|
|
|
|
|
children: <Widget>[
|
|
|
|
|
Padding(
|
|
|
|
|
padding: EdgeInsets.only(right: 9.5),
|
|
|
|
|
child: Image.asset(
|
|
|
|
|
'assets/images/closed_box.png',
|
|
|
|
|
height:
|
|
|
|
|
MediaQuery.of(context).size.height *
|
|
|
|
|
Expanded(
|
|
|
|
|
child: Padding(
|
|
|
|
|
padding: EdgeInsets.all(4.0),
|
|
|
|
|
child: Column(
|
|
|
|
|
mainAxisAlignment: MainAxisAlignment.center,
|
|
|
|
|
children: <Widget>[
|
|
|
|
|
Padding(
|
|
|
|
|
padding: EdgeInsets.only(right: 9.5),
|
|
|
|
|
child: Image.asset(
|
|
|
|
|
'assets/images/closed_box.png',
|
|
|
|
|
height: MediaQuery.of(context)
|
|
|
|
|
.size
|
|
|
|
|
.height *
|
|
|
|
|
0.09,
|
|
|
|
|
width:
|
|
|
|
|
MediaQuery.of(context).size.width *
|
|
|
|
|
width: MediaQuery.of(context)
|
|
|
|
|
.size
|
|
|
|
|
.width *
|
|
|
|
|
0.20,
|
|
|
|
|
//fit: BoxFit.cover,
|
|
|
|
|
)),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
)
|
|
|
|
|
],
|
|
|
|
|
//fit: BoxFit.cover,
|
|
|
|
|
)),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
)
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
)
|
|
|
|
|
],
|
|
|
|
|
)
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
Column(
|
|
|
|
|
children: <Widget>[
|
|
|
|
|
Padding(
|
|
|
|
|
padding: EdgeInsets.symmetric(horizontal: 12.0),
|
|
|
|
|
padding: EdgeInsets.symmetric(horizontal: 10.0),
|
|
|
|
|
child: Container(
|
|
|
|
|
height: MediaQuery.of(context).size.height * 0.15,
|
|
|
|
|
width: MediaQuery.of(context).size.width * 0.43,
|
|
|
|
|
width: MediaQuery.of(context).size.width * 0.44,
|
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
|
borderRadius: BorderRadius.circular(12.0),
|
|
|
|
|
borderRadius: BorderRadius.circular(15.0),
|
|
|
|
|
gradient: LinearGradient(
|
|
|
|
|
colors: [Color(0xff17AFB8), Color(0xff49C1BC)]),
|
|
|
|
|
),
|
|
|
|
|
child: Row(
|
|
|
|
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
|
|
|
|
children: <Widget>[
|
|
|
|
|
Padding(
|
|
|
|
|
padding: EdgeInsets.all(12.0),
|
|
|
|
|
child: Column(
|
|
|
|
|
mainAxisAlignment:
|
|
|
|
|
MainAxisAlignment.spaceEvenly,
|
|
|
|
|
children: <Widget>[
|
|
|
|
|
Text(
|
|
|
|
|
'You Have',
|
|
|
|
|
style: TextStyle(
|
|
|
|
|
color: Colors.white, fontSize: 10.0),
|
|
|
|
|
),
|
|
|
|
|
Text(
|
|
|
|
|
'25',
|
|
|
|
|
style: TextStyle(
|
|
|
|
|
color: Colors.white, fontSize: 25.0),
|
|
|
|
|
),
|
|
|
|
|
Text(
|
|
|
|
|
'unWanted\n Packge',
|
|
|
|
|
style: TextStyle(
|
|
|
|
|
color: Colors.white, fontSize: 10.0),
|
|
|
|
|
)
|
|
|
|
|
],
|
|
|
|
|
Expanded(
|
|
|
|
|
child: Padding(
|
|
|
|
|
padding: EdgeInsets.all(12.0),
|
|
|
|
|
child: Column(
|
|
|
|
|
mainAxisAlignment:
|
|
|
|
|
MainAxisAlignment.spaceEvenly,
|
|
|
|
|
children: <Widget>[
|
|
|
|
|
Text(
|
|
|
|
|
'You Have',
|
|
|
|
|
style: TextStyle(
|
|
|
|
|
color: Colors.white, fontSize: 10.0),
|
|
|
|
|
),
|
|
|
|
|
Text(
|
|
|
|
|
'25',
|
|
|
|
|
style: TextStyle(
|
|
|
|
|
color: Colors.white, fontSize: 25.0),
|
|
|
|
|
),
|
|
|
|
|
Expanded(
|
|
|
|
|
child: Text(
|
|
|
|
|
'unWanted\n Packge',
|
|
|
|
|
style: TextStyle(
|
|
|
|
|
color: Colors.white,
|
|
|
|
|
fontSize: 10.0),
|
|
|
|
|
),
|
|
|
|
|
)
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
Padding(
|
|
|
|
@ -186,9 +207,9 @@ class _DashboardScreenState extends State<DashboardScreen> {
|
|
|
|
|
Image.asset(
|
|
|
|
|
'assets/images/open_box.png',
|
|
|
|
|
height: MediaQuery.of(context).size.height *
|
|
|
|
|
0.11,
|
|
|
|
|
0.10,
|
|
|
|
|
width: MediaQuery.of(context).size.width *
|
|
|
|
|
0.24,
|
|
|
|
|
0.20,
|
|
|
|
|
scale: 0.9,
|
|
|
|
|
fit: BoxFit.cover,
|
|
|
|
|
),
|
|
|
|
@ -204,16 +225,16 @@ class _DashboardScreenState extends State<DashboardScreen> {
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
Padding(
|
|
|
|
|
padding: EdgeInsets.symmetric(vertical: 16.0, horizontal: 12.0),
|
|
|
|
|
padding: EdgeInsets.symmetric(vertical: 16.0, horizontal: 15.0),
|
|
|
|
|
child: Row(
|
|
|
|
|
children: <Widget>[
|
|
|
|
|
Expanded(
|
|
|
|
|
child: InkWell(
|
|
|
|
|
child: Container(
|
|
|
|
|
height: 140,
|
|
|
|
|
width: 350,
|
|
|
|
|
height: MediaQuery.of(context).size.height * 0.16,
|
|
|
|
|
width: MediaQuery.of(context).size.width * 0.50,
|
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
|
borderRadius: BorderRadius.circular(12.0),
|
|
|
|
|
borderRadius: BorderRadius.circular(15.0),
|
|
|
|
|
gradient: LinearGradient(colors: [
|
|
|
|
|
Color(0xff48C0BC),
|
|
|
|
|
Color(0xff17AFB8)
|
|
|
|
@ -230,7 +251,7 @@ class _DashboardScreenState extends State<DashboardScreen> {
|
|
|
|
|
MediaQuery.of(context).size.width * 0.25,
|
|
|
|
|
height:
|
|
|
|
|
MediaQuery.of(context).size.height * 0.14,
|
|
|
|
|
fit: BoxFit.fitHeight,
|
|
|
|
|
fit: BoxFit.cover,
|
|
|
|
|
)
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
@ -266,7 +287,7 @@ class _DashboardScreenState extends State<DashboardScreen> {
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
Padding(
|
|
|
|
|
padding: EdgeInsets.symmetric(horizontal: 12.0, vertical: 10.0),
|
|
|
|
|
padding: EdgeInsets.symmetric(horizontal: 12.0, vertical: 1.0),
|
|
|
|
|
child: Row(
|
|
|
|
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
|
|
|
|
children: <Widget>[
|
|
|
|
@ -313,73 +334,86 @@ class _DashboardScreenState extends State<DashboardScreen> {
|
|
|
|
|
shrinkWrap: true,
|
|
|
|
|
scrollDirection: Axis.vertical,
|
|
|
|
|
itemCount: //model.orders == null ? 0 : model.orders.length,
|
|
|
|
|
2,
|
|
|
|
|
3,
|
|
|
|
|
itemBuilder: (BuildContext context, int index) {
|
|
|
|
|
return Padding(
|
|
|
|
|
padding: EdgeInsets.symmetric(horizontal: 12.0),
|
|
|
|
|
padding: EdgeInsets.symmetric(horizontal: 12.2),
|
|
|
|
|
child: RoundedContainer(
|
|
|
|
|
height: SizeConfig.heightMultiplier * 10.5,
|
|
|
|
|
height: MediaQuery.of(context).size.height * 0.108,
|
|
|
|
|
child: Row(
|
|
|
|
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
|
|
|
|
children: <Widget>[
|
|
|
|
|
Column(
|
|
|
|
|
mainAxisAlignment: MainAxisAlignment.center,
|
|
|
|
|
children: <Widget>[
|
|
|
|
|
Padding(
|
|
|
|
|
padding: EdgeInsets.only(left: 22.0),
|
|
|
|
|
child: Image.asset(
|
|
|
|
|
'assets/images/location.png'),
|
|
|
|
|
)
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
if (model.orders.length != 0)
|
|
|
|
|
Column(
|
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
|
Expanded(
|
|
|
|
|
flex: 1,
|
|
|
|
|
child: Column(
|
|
|
|
|
mainAxisAlignment: MainAxisAlignment.center,
|
|
|
|
|
children: <Widget>[
|
|
|
|
|
Text(
|
|
|
|
|
model.orders[index].firstName +
|
|
|
|
|
' ' +
|
|
|
|
|
model.orders[index].lastName,
|
|
|
|
|
style: TextStyle(fontSize: 20.0),
|
|
|
|
|
),
|
|
|
|
|
Text(
|
|
|
|
|
model.orders[index].mobileNumber,
|
|
|
|
|
style: TextStyle(
|
|
|
|
|
color: Color(0xff30B7B9),
|
|
|
|
|
fontWeight: FontWeight.w600,
|
|
|
|
|
fontSize: 15.0),
|
|
|
|
|
),
|
|
|
|
|
Text(
|
|
|
|
|
'Olaya ST, Behind kfc next to king-\ndom tower 2nd floor n.o 247',
|
|
|
|
|
style: TextStyle(color: Colors.black45),
|
|
|
|
|
Padding(
|
|
|
|
|
padding: EdgeInsets.only(left: 22.0),
|
|
|
|
|
child: Image.asset(
|
|
|
|
|
'assets/images/location.png'),
|
|
|
|
|
)
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
if (model.orders.length != 0)
|
|
|
|
|
Expanded(
|
|
|
|
|
flex: 3,
|
|
|
|
|
child: Column(
|
|
|
|
|
crossAxisAlignment:
|
|
|
|
|
CrossAxisAlignment.start,
|
|
|
|
|
children: <Widget>[
|
|
|
|
|
Text(
|
|
|
|
|
model.orders[index].firstName +
|
|
|
|
|
' ' +
|
|
|
|
|
model.orders[index].lastName,
|
|
|
|
|
style: TextStyle(fontSize: 18.0),
|
|
|
|
|
),
|
|
|
|
|
Text(
|
|
|
|
|
model.orders[index].mobileNumber,
|
|
|
|
|
style: TextStyle(
|
|
|
|
|
color: Color(0xff30B7B9),
|
|
|
|
|
fontWeight: FontWeight.w600,
|
|
|
|
|
fontSize: 15.0),
|
|
|
|
|
),
|
|
|
|
|
Expanded(
|
|
|
|
|
child: Text(
|
|
|
|
|
'Olaya ST, Behind kfc next to king ',
|
|
|
|
|
style:
|
|
|
|
|
TextStyle(color: Colors.black45),
|
|
|
|
|
),
|
|
|
|
|
)
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
Padding(
|
|
|
|
|
padding: EdgeInsets.all(10.0),
|
|
|
|
|
child: Column(
|
|
|
|
|
mainAxisAlignment: MainAxisAlignment.center,
|
|
|
|
|
children: <Widget>[
|
|
|
|
|
CircleAvatar(
|
|
|
|
|
backgroundColor: Colors.black45,
|
|
|
|
|
radius: 30.0,
|
|
|
|
|
Expanded(
|
|
|
|
|
child: CircleAvatar(
|
|
|
|
|
backgroundColor: Colors.white,
|
|
|
|
|
maxRadius: 28.9,
|
|
|
|
|
child: Padding(
|
|
|
|
|
padding: const EdgeInsets.all(8.0),
|
|
|
|
|
child: Text(
|
|
|
|
|
'3 K.m \n away',
|
|
|
|
|
style: TextStyle(
|
|
|
|
|
color: Color(0xff30B7B9),
|
|
|
|
|
fontSize: 14.0),
|
|
|
|
|
backgroundColor: Colors.black45,
|
|
|
|
|
radius: 28.0,
|
|
|
|
|
child: CircleAvatar(
|
|
|
|
|
backgroundColor: Colors.white,
|
|
|
|
|
maxRadius: 25.1,
|
|
|
|
|
child: Padding(
|
|
|
|
|
padding: const EdgeInsets.all(8.0),
|
|
|
|
|
child: Text(
|
|
|
|
|
'3 K.m \n away',
|
|
|
|
|
style: TextStyle(
|
|
|
|
|
color: Color(0xff30B7B9),
|
|
|
|
|
fontSize: 12.5,
|
|
|
|
|
fontWeight: FontWeight.w600),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
)
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
)
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|