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,7 +32,8 @@ 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(
child: Column(
mainAxisAlignment: MainAxisAlignment.start, mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[ children: <Widget>[
@ -43,16 +46,19 @@ class _DashboardScreenState extends State<DashboardScreen> {
child: Text( child: Text(
'Driver Name', 'Driver Name',
style: TextStyle( style: TextStyle(
fontWeight: FontWeight.w400, fontSize: 25.0), fontWeight: FontWeight.w400,
fontSize: 25.0),
), ),
), ),
], ],
), ),
),
], ],
), ),
), ),
Padding( Padding(
padding: EdgeInsets.all(16.0), padding: EdgeInsets.all(16.0),
child: SafeArea(
child: Column( child: Column(
children: <Widget>[ children: <Widget>[
CircleAvatar( CircleAvatar(
@ -70,19 +76,21 @@ class _DashboardScreenState extends State<DashboardScreen> {
], ],
), ),
), ),
),
], ],
), ),
Row( Row(
children: <Widget>[ children: <Widget>[
Column( Expanded(
child: 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)]),
), ),
@ -90,10 +98,10 @@ class _DashboardScreenState extends State<DashboardScreen> {
mainAxisAlignment: MainAxisAlignment.spaceBetween, mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: <Widget>[ children: <Widget>[
Padding( Padding(
padding: EdgeInsets.all(12.0), padding: EdgeInsets.all(10.0),
child: Column( child: Column(
mainAxisAlignment: mainAxisAlignment:
MainAxisAlignment.spaceEvenly, MainAxisAlignment.spaceBetween,
children: <Widget>[ children: <Widget>[
Text( Text(
'You Have', 'You Have',
@ -105,15 +113,19 @@ class _DashboardScreenState extends State<DashboardScreen> {
style: TextStyle( style: TextStyle(
color: Colors.white, fontSize: 25.0), color: Colors.white, fontSize: 25.0),
), ),
Text( Expanded(
child: Text(
'Undelivered \n Packages', 'Undelivered \n Packages',
style: TextStyle( style: TextStyle(
color: Colors.white, fontSize: 10.0), color: Colors.white,
fontSize: 10.0),
),
) )
], ],
), ),
), ),
Padding( Expanded(
child: Padding(
padding: EdgeInsets.all(4.0), padding: EdgeInsets.all(4.0),
child: Column( child: Column(
mainAxisAlignment: MainAxisAlignment.center, mainAxisAlignment: MainAxisAlignment.center,
@ -122,16 +134,19 @@ class _DashboardScreenState extends State<DashboardScreen> {
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,
)), )),
], ],
), ),
),
) )
], ],
), ),
@ -139,22 +154,24 @@ class _DashboardScreenState extends State<DashboardScreen> {
) )
], ],
), ),
),
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(
child: Padding(
padding: EdgeInsets.all(12.0), padding: EdgeInsets.all(12.0),
child: Column( child: Column(
mainAxisAlignment: mainAxisAlignment:
@ -170,14 +187,18 @@ class _DashboardScreenState extends State<DashboardScreen> {
style: TextStyle( style: TextStyle(
color: Colors.white, fontSize: 25.0), color: Colors.white, fontSize: 25.0),
), ),
Text( Expanded(
child: Text(
'unWanted\n Packge', 'unWanted\n Packge',
style: TextStyle( style: TextStyle(
color: Colors.white, fontSize: 10.0), color: Colors.white,
fontSize: 10.0),
),
) )
], ],
), ),
), ),
),
Padding( Padding(
padding: EdgeInsets.only(right: 9.5), padding: EdgeInsets.only(right: 9.5),
child: Column( child: Column(
@ -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,16 +334,18 @@ 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(
flex: 1,
child: Column(
mainAxisAlignment: MainAxisAlignment.center, mainAxisAlignment: MainAxisAlignment.center,
children: <Widget>[ children: <Widget>[
Padding( Padding(
@ -332,15 +355,19 @@ class _DashboardScreenState extends State<DashboardScreen> {
) )
], ],
), ),
),
if (model.orders.length != 0) if (model.orders.length != 0)
Column( Expanded(
crossAxisAlignment: CrossAxisAlignment.start, flex: 3,
child: Column(
crossAxisAlignment:
CrossAxisAlignment.start,
children: <Widget>[ children: <Widget>[
Text( Text(
model.orders[index].firstName + model.orders[index].firstName +
' ' + ' ' +
model.orders[index].lastName, model.orders[index].lastName,
style: TextStyle(fontSize: 20.0), style: TextStyle(fontSize: 18.0),
), ),
Text( Text(
model.orders[index].mobileNumber, model.orders[index].mobileNumber,
@ -349,37 +376,44 @@ class _DashboardScreenState extends State<DashboardScreen> {
fontWeight: FontWeight.w600, fontWeight: FontWeight.w600,
fontSize: 15.0), fontSize: 15.0),
), ),
Text( Expanded(
'Olaya ST, Behind kfc next to king-\ndom tower 2nd floor n.o 247', child: Text(
style: TextStyle(color: Colors.black45), '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(
child: CircleAvatar(
backgroundColor: Colors.black45, backgroundColor: Colors.black45,
radius: 30.0, radius: 28.0,
child: CircleAvatar( child: CircleAvatar(
backgroundColor: Colors.white, backgroundColor: Colors.white,
maxRadius: 28.9, maxRadius: 25.1,
child: Padding( child: Padding(
padding: const EdgeInsets.all(8.0), padding: const EdgeInsets.all(8.0),
child: Text( child: Text(
'3 K.m \n away', '3 K.m \n away',
style: TextStyle( style: TextStyle(
color: Color(0xff30B7B9), color: Color(0xff30B7B9),
fontSize: 14.0), 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