Merge branch 'PendingOrders' into 'development'

Pending orders

See merge request Cloud_Solution/driver-app!8
merge-requests/10/merge
Elham 6 years ago
commit 81e4b9e76a

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

@ -25,6 +25,100 @@ class _OrdersListScreenState extends State<OrdersListScreen> {
'Your Delivery Que', 'Your Delivery Que',
), ),
), ),
body: Column(
children: <Widget>[
Text(
'Nearest',
style: TextStyle(color: Color(0xff30B7B9), fontSize: 18.0),
),
ListView.builder(
itemCount: model.orders == null ? 0 : model.orders.length,
scrollDirection: Axis.vertical,
shrinkWrap: true,
itemBuilder: (BuildContext context, int index) {
return Padding(
padding: EdgeInsets.symmetric(horizontal: 12.2),
child: RoundedContainer(
height: MediaQuery.of(context).size.height * 0.11,
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: <Widget>[
Expanded(
flex: 1,
child: 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)
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>[
Expanded(
child: CircleAvatar(
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),
),
),
),
),
)
],
),
),
],
),
),
);
}),
],
),
), ),
); );
} }

Loading…
Cancel
Save