service update and design updates

design_update
hussam al-habibeh 6 years ago
parent 4e9fdfd103
commit 3eedb7e667

@ -10,6 +10,8 @@ class PendingOrders {
String lastName; String lastName;
String mobileNumber; String mobileNumber;
int distanceInKilometers; int distanceInKilometers;
String longitude;
String latitude;
PendingOrders({ PendingOrders({
this.driverID, this.driverID,
@ -23,6 +25,8 @@ class PendingOrders {
this.lastName, this.lastName,
this.mobileNumber, this.mobileNumber,
this.distanceInKilometers, this.distanceInKilometers,
this.longitude,
this.latitude,
}); });
PendingOrders.fromJson(Map<String, dynamic> json) { PendingOrders.fromJson(Map<String, dynamic> json) {
@ -48,6 +52,9 @@ class PendingOrders {
data['TokenID'] = this.tokenID; data['TokenID'] = this.tokenID;
data['UserID'] = this.userID; data['UserID'] = this.userID;
data['MobileNo'] = this.mobileNo; data['MobileNo'] = this.mobileNo;
data['Longitude'] = this.longitude;
data['Latitude'] = this.latitude;
return data; return data;
} }
} }

@ -23,6 +23,8 @@ class OrdersService extends BaseService {
searchKey: "", searchKey: "",
pageSize: 0, pageSize: 0,
pageIndex: 0, pageIndex: 0,
latitude: "24.640000",
longitude: "46.753000",
); );
DeliverdOrderModel _requestGetDeliverdOrders = DeliverdOrderModel( DeliverdOrderModel _requestGetDeliverdOrders = DeliverdOrderModel(
searchKey: "", searchKey: "",

@ -588,7 +588,7 @@ class _DashboardScreenState extends State<DashboardScreen> {
child: Text( child: Text(
model.orders[index].distanceInKilometers model.orders[index].distanceInKilometers
.toString() + .toString() +
' K.m\naway', '\nK.m\naway',
style: TextStyle( style: TextStyle(
color: Color(0xff42B6AD), color: Color(0xff42B6AD),
fontWeight: FontWeight.w800, fontWeight: FontWeight.w800,

@ -23,39 +23,41 @@ class DeliveryConfirmedPage extends StatelessWidget {
return BaseView<OrdersViewModel>( return BaseView<OrdersViewModel>(
builder: (_, model, w) => AppScaffold( builder: (_, model, w) => AppScaffold(
isShowAppBar: true, isShowAppBar: true,
appBarColor: Theme.of(context).primaryColor, appBarColor: Theme.of(context).primaryColor,
arrowColor: Colors.white, arrowColor: Colors.white,
titleColor: Colors.white, titleColor: Colors.white,
body: SafeArea( body: SafeArea(
child: Container( child: Container(
color: Theme.of(context).primaryColor, color: Theme.of(context).primaryColor,
child: ListView( child: ListView(
children: <Widget>[ children: <Widget>[
Stack( Stack(
children: <Widget>[ children: <Widget>[
Column( Column(
children: <Widget>[ children: <Widget>[
Container( Container(
child: Column( child: Column(
children: <Widget>[ children: <Widget>[
Container( Container(
width: MediaQuery.of(context).size.width, width: MediaQuery.of(context).size.width,
height: MediaQuery.of(context).size.width * 0.7, height: MediaQuery.of(context).size.width * 0.7,
padding: EdgeInsets.only( padding: EdgeInsets.only(
top: MediaQuery.of(context).size.width * 0.12, top: MediaQuery.of(context).size.width * 0.12,
), ),
decoration: BoxDecoration( decoration: BoxDecoration(
color: Colors.white10, shape: BoxShape.circle), color: Colors.white10,
child: Column( shape: BoxShape.circle),
children: <Widget>[ child: Column(
Icon( children: <Widget>[
Icons.check_circle, Icon(
color: Colors.white, Icons.check_circle,
size: 75, color: Colors.white,
), size: 75,
SizedBox( ),
height: SizedBox(
MediaQuery.of(context).size.width * 0.03, height:
MediaQuery.of(context).size.width *
0.03,
), ),
Text( Text(
TranslationBase.of(context).deliveryInfo, TranslationBase.of(context).deliveryInfo,
@ -65,100 +67,106 @@ class DeliveryConfirmedPage extends StatelessWidget {
fontWeight: FontWeight.bold), fontWeight: FontWeight.bold),
), ),
SizedBox( SizedBox(
height: height:
MediaQuery.of(context).size.width * 0.03, MediaQuery.of(context).size.width *
), 0.03,
Text(
TranslationBase.of(context).confirmationSent,
style: TextStyle(
color: Colors.white,
fontSize: 13,
), ),
), Text(
], TranslationBase.of(context)
.confirmationSent,
style: TextStyle(
color: Colors.white,
fontSize: 13,
),
),
],
),
), ),
), ],
], ),
), ),
), ],
],
),
Container(
width: MediaQuery.of(context).size.width,
height: MediaQuery.of(context).size.width,
),
Container(
width: MediaQuery.of(context).size.width,
height: MediaQuery.of(context).size.width * 1.0,
margin: EdgeInsets.only(
top: MediaQuery.of(context).size.width * 0.75,
), ),
decoration: BoxDecoration( Container(
color: Colors.white, width: MediaQuery.of(context).size.width,
borderRadius: BorderRadius.only( height: MediaQuery.of(context).size.width,
topLeft: Radius.circular(80),
topRight: Radius.circular(80)),
), ),
child: Column( Container(
mainAxisAlignment: MainAxisAlignment.end, width: MediaQuery.of(context).size.width,
crossAxisAlignment: CrossAxisAlignment.center, height: MediaQuery.of(context).size.width * 1.0,
children: <Widget>[ margin: EdgeInsets.only(
Container( top: MediaQuery.of(context).size.width * 0.75,
margin: EdgeInsets.only( ),
bottom: MediaQuery.of(context).size.width * 0.09, decoration: BoxDecoration(
), color: Colors.white,
child: Column( borderRadius: BorderRadius.only(
children: <Widget>[ topLeft: Radius.circular(80),
FlatButton.icon( topRight: Radius.circular(80)),
padding: EdgeInsets.all(8), ),
color: Colors.orangeAccent, child: Column(
shape: RoundedRectangleBorder( mainAxisAlignment: MainAxisAlignment.end,
borderRadius: new BorderRadius.circular(10.0), crossAxisAlignment: CrossAxisAlignment.center,
children: <Widget>[
Container(
margin: EdgeInsets.only(
bottom: MediaQuery.of(context).size.width * 0.09,
),
child: Column(
children: <Widget>[
FlatButton.icon(
padding: EdgeInsets.all(8),
color: Colors.orangeAccent,
shape: RoundedRectangleBorder(
borderRadius:
new BorderRadius.circular(10.0),
),
label: Text(
TranslationBase.of(context).addNoteBtn,
style: TextStyle(color: Colors.white),
),
icon: Icon(
Icons.mode_edit,
color: Colors.white,
),
onPressed: () {},
), ),
label: Text( SizedBox(
TranslationBase.of(context).addNoteBtn, height: MediaQuery.of(context).size.width *
style: TextStyle(color: Colors.white), 0.02, //20,
), ),
icon: Icon( Container(
Icons.mode_edit, margin: EdgeInsets.all(10),
color: Colors.white, child: SecondaryButton(
label: TranslationBase.of(context)
.nextDelivery,
onTap: () {
getNextOrder(context, model);
},
),
), ),
onPressed: () {}, ],
), ),
SizedBox(
height:
MediaQuery.of(context).size.width * 0.02, //20,
),
Container(
margin: EdgeInsets.all(10),
child: SecondaryButton(
label: TranslationBase.of(context).nextDelivery,
onTap: () {
getNextOrder(context, model);
},),
),
],
), ),
), ],
], ),
), ),
), Container(
Container( margin: EdgeInsets.only(
margin: EdgeInsets.only(
top: MediaQuery.of(context).size.width * 0.6, top: MediaQuery.of(context).size.width * 0.6,
),
child: CustomerBriefCard(
itemId: item.orderID,
customerFirstName: item.firstName,
customerLastName: item.lastName,
mobileNo: item.mobileNumber,
totalPayment: item.amount,
showDistance: false,
deliveryTime: item.orderCreatedOn),
), ),
child: CustomerBriefCard( ],
itemId: item.orderID, ),
customerFirstName: item.firstName, ],
customerLastName: item.lastName, ),
mobileNo: item.mobileNumber,
totalPayment: item.amount,
showDistance: false,
deliveryTime: item.orderCreatedOn),
),
],
),
],),
), ),
), ),
), ),

File diff suppressed because one or more lines are too long

@ -115,7 +115,7 @@ class _OrdersListScreenState extends State<OrdersListScreen> {
child: Text( child: Text(
model.orders[index].distanceInKilometers model.orders[index].distanceInKilometers
.toString() + .toString() +
' K.m\naway', '\nK.m\naway',
style: TextStyle( style: TextStyle(
color: Color(0xff42B6AD), color: Color(0xff42B6AD),
fontWeight: FontWeight.w800, fontWeight: FontWeight.w800,

@ -26,8 +26,8 @@ class CircleContainer extends StatelessWidget {
color: color, color: color,
border: Border.all( border: Border.all(
color: borderColor ?? Hexcolor("#707070"), width: borderWidth)), color: borderColor ?? Hexcolor("#707070"), width: borderWidth)),
height: 60, height: 80,
width: 60, width: 80,
), ),
); );
} }

@ -66,7 +66,10 @@ class CustomerBriefCard extends StatelessWidget {
flex: 3, flex: 3,
child: Text( child: Text(
'ID: ${itemId}', 'ID: ${itemId}',
style: TextStyle(color: Color(0xFFADACAD)), style: TextStyle(
color: Color(0xFFADACAD),
fontWeight: FontWeight.w800,
fontSize: 17.5),
), ),
), ),
Expanded( Expanded(
@ -91,7 +94,7 @@ class CustomerBriefCard extends StatelessWidget {
), ),
Text( Text(
'${customerFirstName} ${customerLastName}', '${customerFirstName} ${customerLastName}',
style: TextStyle(fontSize: 20, fontWeight: FontWeight.w900), style: TextStyle(fontSize: 20, fontWeight: FontWeight.w500),
), ),
SizedBox( SizedBox(
height: MediaQuery.of(context).size.width * 0.019, height: MediaQuery.of(context).size.width * 0.019,
@ -142,7 +145,7 @@ class CustomerBriefCard extends StatelessWidget {
child: Text( child: Text(
totalPayment.toString(), totalPayment.toString(),
textAlign: TextAlign.end, textAlign: TextAlign.end,
style: TextStyle(fontWeight: FontWeight.w600), style: TextStyle(fontWeight: FontWeight.w400),
), ),
), ),
], ],
@ -163,7 +166,7 @@ class CustomerBriefCard extends StatelessWidget {
child: Text( child: Text(
'${DateUtil.getMonthDayYearDateFormatted(DateUtil.convertStringToDate(deliveryTime))} ${(DateUtil.convertStringToHours(deliveryTime))}', '${DateUtil.getMonthDayYearDateFormatted(DateUtil.convertStringToDate(deliveryTime))} ${(DateUtil.convertStringToHours(deliveryTime))}',
textAlign: TextAlign.end, textAlign: TextAlign.end,
style: TextStyle(fontWeight: FontWeight.w600)), style: TextStyle(fontWeight: FontWeight.w400)),
), ),
], ],
) )

@ -12,25 +12,19 @@ class DeliveryInfoButton extends StatelessWidget {
Widget build(BuildContext context) { Widget build(BuildContext context) {
print(btnColor); print(btnColor);
return Padding( return Padding(
padding: EdgeInsets.all(8.0), padding: MediaQuery.of(context).orientation == Orientation.portrait
? EdgeInsets.all(4.0)
: EdgeInsets.all(7.0),
child: Column( child: Column(
children: <Widget>[ children: <Widget>[
SizedBox( SizedBox(
height: MediaQuery height: MediaQuery.of(context).size.width * 0.14,
.of(context) width: MediaQuery.of(context).size.width * 0.165, // specific value
.size child: InkWell(
.width * 0.14, child: btnIcon,
width: MediaQuery
.of(context)
.size
.width * 0.165, // specific value
child:
InkWell(
child: btnIcon,
onTap: btnFunction, onTap: btnFunction,
), ),
), ),
Text( Text(
btnName, btnName,
style: TextStyle( style: TextStyle(

Loading…
Cancel
Save