Merge branch 'merge_branches_into_dev' into 'development'

Merge branches into dev

See merge request Cloud_Solution/driver-app!71
logut
Elham 5 years ago
commit 199b58a45a

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

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

@ -6,6 +6,7 @@ import 'package:driverapp/core/viewModels/authentication_view_model.dart';
import 'package:driverapp/core/viewModels/orders_view_model.dart';
import 'package:driverapp/pages/delivery/information_page.dart';
import 'package:driverapp/pages/orders/pending_orders_page.dart';
import 'package:driverapp/pages/setting/setting.dart';
import 'package:driverapp/uitl/app_toast.dart';
import 'package:driverapp/uitl/translations_delegate_base.dart';
import 'package:driverapp/uitl/utils.dart';
@ -90,7 +91,8 @@ class _DashboardScreenState extends State<DashboardScreen> {
child: SafeArea(
child: Column(
children: <Widget>[
CircleAvatar(
InkWell(
child:CircleAvatar(
radius: 25.5,
backgroundColor: Color(0xff30B7B9),
child: CircleAvatar(
@ -99,8 +101,15 @@ class _DashboardScreenState extends State<DashboardScreen> {
child: Image.asset(
'assets/images/driver.png',
fit: BoxFit.contain,
),
),),
),
onTap: (){
Navigator.push(
context,
MaterialPageRoute(
builder: (context) =>
SettingPage(driverName:_authenticationViewModel.user.userName, driverID:_authenticationViewModel.user.userID)));
},
),
],
),
@ -588,7 +597,7 @@ class _DashboardScreenState extends State<DashboardScreen> {
child: Text(
model.orders[index].distanceInKilometers
.toString() +
' K.m\naway',
'\nK.m\naway',
style: TextStyle(
color: Color(0xff42B6AD),
fontWeight: FontWeight.w800,

@ -24,39 +24,41 @@ class DeliveryConfirmedPage extends StatelessWidget {
return BaseView<OrdersViewModel>(
builder: (_, model, w) => AppScaffold(
isShowAppBar: true,
appBarColor: Theme.of(context).primaryColor,
arrowColor: Colors.white,
titleColor: Colors.white,
body: SafeArea(
child: Container(
color: Theme.of(context).primaryColor,
child: ListView(
children: <Widget>[
Stack(
appBarColor: Theme.of(context).primaryColor,
arrowColor: Colors.white,
titleColor: Colors.white,
body: SafeArea(
child: Container(
color: Theme.of(context).primaryColor,
child: ListView(
children: <Widget>[
Stack(
children: <Widget>[
Column(
children: <Widget>[
Container(
child: Column(
children: <Widget>[
Container(
width: MediaQuery.of(context).size.width,
height: MediaQuery.of(context).size.width * 0.7,
padding: EdgeInsets.only(
top: MediaQuery.of(context).size.width * 0.12,
),
decoration: BoxDecoration(
color: Colors.white10, shape: BoxShape.circle),
child: Column(
children: <Widget>[
Icon(
Icons.check_circle,
color: Colors.white,
size: 75,
),
SizedBox(
height:
MediaQuery.of(context).size.width * 0.03,
child: Column(
children: <Widget>[
Container(
width: MediaQuery.of(context).size.width,
height: MediaQuery.of(context).size.width * 0.7,
padding: EdgeInsets.only(
top: MediaQuery.of(context).size.width * 0.12,
),
decoration: BoxDecoration(
color: Colors.white10,
shape: BoxShape.circle),
child: Column(
children: <Widget>[
Icon(
Icons.check_circle,
color: Colors.white,
size: 75,
),
SizedBox(
height:
MediaQuery.of(context).size.width *
0.03,
),
Text(
TranslationBase.of(context).deliveryInfo,
@ -138,31 +140,32 @@ class DeliveryConfirmedPage extends StatelessWidget {
.nextDelivery,
loading: model.state == ViewState.BusyLocal,
onTap: () {
getNextOrder(context, model);
},),
),
],
getNextOrder(context, model);},
),
),
],
),
),
),
],
],
),
),
),
Container(
margin: EdgeInsets.only(
Container(
margin: EdgeInsets.only(
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(
model.orders[index].distanceInKilometers
.toString() +
' K.m\naway',
'\nK.m\naway',
style: TextStyle(
color: Color(0xff42B6AD),
fontWeight: FontWeight.w800,

@ -0,0 +1,163 @@
import 'package:driverapp/uitl/translations_delegate_base.dart';
import 'package:driverapp/widgets/others/app_scaffold_widget.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
class SettingPage extends StatelessWidget {
final String driverName;//_authenticationViewModel.user.userName
final int driverID;
SettingPage({this.driverName, this.driverID});
@override
Widget build(BuildContext context) {
return AppScaffold(
isShowAppBar: true,
appBarColor: Color(0xff30B7B9),
arrowColor: Colors.white,
titleColor: Colors.white,
body: SingleChildScrollView(
child: Column(
children: <Widget>[
Container(
width: double.infinity,
child: Column(
children: <Widget>[
Container(
width: MediaQuery.of(context).size.width,
height: MediaQuery.of(context).size.width * 0.7,
child: CircleAvatar(
radius: 25.5,
backgroundColor: Theme.of(context).primaryColor,
child: CircleAvatar(
backgroundColor: Theme.of(context).primaryColor,
maxRadius: 200.0,
child: Image.asset(
'assets/images/driver.png',
height: MediaQuery.of(context).size.width * 1 ,
width: MediaQuery.of(context).size.width * 1,
fit: BoxFit.contain,
),
),
),
),
SizedBox(height: MediaQuery.of(context).size.width *0.05,),
Container(
child: Text(
driverName,
style: TextStyle(
fontSize: 40,
fontWeight: FontWeight.w600,
color: Colors.white
),
),
),
SizedBox(height: MediaQuery.of(context).size.width *0.05,),
Container(
child: Text(
'ID: ${driverID.toString()}',
style: TextStyle(
fontSize: 20,
color: Colors.white
),
),
),
],
),
),
SizedBox(height: MediaQuery.of(context).size.width *0.1,),
Container(
margin: EdgeInsets.only(left: 35),
child: Column(
crossAxisAlignment: CrossAxisAlignment.stretch,
children: <Widget>[
InkWell(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
Container(
margin: EdgeInsets.only(left: 15),
child: Row(
children: <Widget>[
Icon(
Icons.input,
size: 40,
color: Colors.white,
),
SizedBox(width: MediaQuery.of(context).size.width *0.05,),
Text(
TranslationBase.of(context).logout,
style: TextStyle(
fontWeight: FontWeight.w500,
color: Colors.white,
fontSize: 18
),
),
],
),
),
SizedBox(
height: MediaQuery.of(context).size.width *0.05,
child: Center(
child: Container(
margin: EdgeInsetsDirectional.only(start: 0, end: 30),
height: 1.0,
color: Colors.white,
),
),
),
],
),
),
SizedBox(height: MediaQuery.of(context).size.width*0.05,),
InkWell(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
Container(
margin: EdgeInsets.only(left: 15),
child: Row(
children: <Widget>[
Icon(
Icons.settings,
size: 40,
color: Colors.white,
),
SizedBox(
width: MediaQuery.of(context).size.width * 0.05,
),
Text(
TranslationBase.of(context).settings,
style: TextStyle(
fontWeight: FontWeight.w500,
color: Colors.white,
fontSize: 18
),
),
],
),
),
SizedBox(
height: 10.0,
child: Center(
child: Container(
margin: EdgeInsetsDirectional.only(start: 0, end: 30),
height: 1.0,
color: Colors.white,
),
),
),
SizedBox(height: MediaQuery.of(context).size.width*0.05,),
],
),
),
],
),
),
],
),
),
);
}
}

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

@ -66,7 +66,10 @@ class CustomerBriefCard extends StatelessWidget {
flex: 3,
child: Text(
'ID: ${itemId}',
style: TextStyle(color: Color(0xFFADACAD)),
style: TextStyle(
color: Color(0xFFADACAD),
fontWeight: FontWeight.w800,
fontSize: 17.5),
),
),
Expanded(
@ -91,7 +94,7 @@ class CustomerBriefCard extends StatelessWidget {
),
Text(
'${customerFirstName} ${customerLastName}',
style: TextStyle(fontSize: 20, fontWeight: FontWeight.w900),
style: TextStyle(fontSize: 20, fontWeight: FontWeight.w500),
),
SizedBox(
height: MediaQuery.of(context).size.width * 0.019,
@ -142,7 +145,7 @@ class CustomerBriefCard extends StatelessWidget {
child: Text(
totalPayment.toString(),
textAlign: TextAlign.end,
style: TextStyle(fontWeight: FontWeight.w600),
style: TextStyle(fontWeight: FontWeight.w400),
),
),
],
@ -163,7 +166,7 @@ class CustomerBriefCard extends StatelessWidget {
child: Text(
'${DateUtil.getMonthDayYearDateFormatted(DateUtil.convertStringToDate(deliveryTime))} ${(DateUtil.convertStringToHours(deliveryTime))}',
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) {
print(btnColor);
return Padding(
padding: EdgeInsets.all(8.0),
padding: MediaQuery.of(context).orientation == Orientation.portrait
? EdgeInsets.all(4.0)
: EdgeInsets.all(7.0),
child: Column(
children: <Widget>[
SizedBox(
height: MediaQuery
.of(context)
.size
.width * 0.14,
width: MediaQuery
.of(context)
.size
.width * 0.165, // specific value
child:
InkWell(
child: btnIcon,
height: MediaQuery.of(context).size.width * 0.14,
width: MediaQuery.of(context).size.width * 0.165, // specific value
child: InkWell(
child: btnIcon,
onTap: btnFunction,
),
),
Text(
btnName,
style: TextStyle(
@ -42,4 +36,4 @@ class DeliveryInfoButton extends StatelessWidget {
),
);
}
}
}

Loading…
Cancel
Save