Compare commits

...

22 Commits

Author SHA1 Message Date
enadhilal ac4c821719 add logout function 1 6 years ago
enadhilal 38c5e7558e Merge branch 'setting_branch' of gitlab.com:Cloud_Solution/driver-app into logout_function 6 years ago
Mohammad Aljammal 1364cb081c Merge branch 'development' into 'master'
Development

See merge request Cloud_Solution/driver-app!72
6 years ago
Elham 199b58a45a Merge branch 'merge_branches_into_dev' into 'development'
Merge branches into dev

See merge request Cloud_Solution/driver-app!71
6 years ago
Elham Rababah 5880b70749 Merge branches 'design_update' and 'merge_branches_into_dev' of https://gitlab.com/Cloud_Solution/driver-app into merge_branches_into_dev
 Conflicts:
	lib/pages/delivery/delivery_confirmed_page.dart
	lib/pages/delivery/information_page.dart
6 years ago
Elham Rababah 94efdef124 Merge branch 'setting_branch' of https://gitlab.com/Cloud_Solution/driver-app into merge_branches_into_dev
 Conflicts:
	lib/pages/dashboard/dashboard_screen.dart
6 years ago
Elham 452a3d78fc Merge branch 'merge_setting_branch_into_dev' into 'development'
fix login issue

See merge request Cloud_Solution/driver-app!70
6 years ago
Elham Rababah c85b82d553 fix login issue 6 years ago
hussam al-habibeh 3eedb7e667 service update and design updates 6 years ago
Elham 3be1346bdb Merge branch 'merge_fix_bottomsheet_into_dev' into 'development'
Merge fix bottomsheet into dev

See merge request Cloud_Solution/driver-app!68
6 years ago
Elham Rababah 301f0cc8a5 Merge branch 'fix_bottomsheet' of https://gitlab.com/Cloud_Solution/driver-app into merge_fix_bottomsheet_into_dev
 Conflicts:
	lib/pages/delivery/information_page.dart
6 years ago
Elham 4b73ad4d43 Merge branch 'design_update' into 'development'
delivery information design update

See merge request Cloud_Solution/driver-app!65
6 years ago
Elham Rababah f3bea772b5 fix bottom sheet design + make the latitude and longitude dynamic 6 years ago
hussam al-habibeh 4e9fdfd103 Merge branch 'master' of https://gitlab.com/Cloud_Solution/driver-app into design_update 6 years ago
hussam al-habibeh c5987bcbdf delivery information design update 6 years ago
Mohammad Aljammal 8382ea895b Merge branch 'development' into 'master'
Development

See merge request Cloud_Solution/driver-app!64
6 years ago
Elham 0317ee6620 Merge branch 'order_list' into 'development'
Order list

See merge request Cloud_Solution/driver-app!63
6 years ago
hussam al-habibeh 00e108e36c updates 6 years ago
hussam al-habibeh 237f0b12a8 Merge branch 'master' of https://gitlab.com/Cloud_Solution/driver-app into order_list
 Conflicts:
	lib/core/service/orders_service.dart
	lib/pages/dashboard/dashboard_screen.dart
6 years ago
hussam al-habibeh 651c1e85d6 add order list info 6 years ago
hussam al-habibeh 783f7fcbf5 add order list info 6 years ago
hussam al-habibeh c52a58af23 Merge branch 'master' of https://gitlab.com/Cloud_Solution/driver-app into order_list
 Conflicts:
	lib/core/service/orders_service.dart
6 years ago

@ -28,6 +28,10 @@ PODS:
- Flutter
- local_auth (0.0.1):
- Flutter
- location (0.0.1):
- Flutter
- location_web (0.0.1):
- Flutter
- map_launcher (0.0.1):
- Flutter
- maps_launcher (0.0.1):
@ -71,6 +75,8 @@ DEPENDENCIES:
- image_cropper (from `.symlinks/plugins/image_cropper/ios`)
- image_picker (from `.symlinks/plugins/image_picker/ios`)
- local_auth (from `.symlinks/plugins/local_auth/ios`)
- location (from `.symlinks/plugins/location/ios`)
- location_web (from `.symlinks/plugins/location_web/ios`)
- map_launcher (from `.symlinks/plugins/map_launcher/ios`)
- maps_launcher (from `.symlinks/plugins/maps_launcher/ios`)
- path_provider_linux (from `.symlinks/plugins/path_provider_linux/ios`)
@ -118,6 +124,10 @@ EXTERNAL SOURCES:
:path: ".symlinks/plugins/image_picker/ios"
local_auth:
:path: ".symlinks/plugins/local_auth/ios"
location:
:path: ".symlinks/plugins/location/ios"
location_web:
:path: ".symlinks/plugins/location_web/ios"
map_launcher:
:path: ".symlinks/plugins/map_launcher/ios"
maps_launcher:
@ -157,6 +167,8 @@ SPEC CHECKSUMS:
image_cropper: c8f9b4157933c7bb965a66d1c5e6c8fd408c6eb4
image_picker: 9c3312491f862b28d21ecd8fdf0ee14e601b3f09
local_auth: 25938960984c3a7f6e3253e3f8d962fdd16852bd
location: 3a2eed4dd2fab25e7b7baf2a9efefe82b512d740
location_web: b94e7433cfe28c0f7c8923c2ee482824b32e55a7
map_launcher: e325db1261d029ff33e08e03baccffe09593ffea
maps_launcher: eae38ee13a9c3f210fa04e04bb4c073fa4c6ed92
MTBBarcodeScanner: f453b33c4b7dfe545d8c6484ed744d55671788cb

@ -242,6 +242,7 @@
"${BUILT_PRODUCTS_DIR}/image_cropper/image_cropper.framework",
"${BUILT_PRODUCTS_DIR}/image_picker/image_picker.framework",
"${BUILT_PRODUCTS_DIR}/local_auth/local_auth.framework",
"${BUILT_PRODUCTS_DIR}/location/location.framework",
"${BUILT_PRODUCTS_DIR}/map_launcher/map_launcher.framework",
"${BUILT_PRODUCTS_DIR}/maps_launcher/maps_launcher.framework",
"${BUILT_PRODUCTS_DIR}/shared_preferences/shared_preferences.framework",
@ -264,6 +265,7 @@
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/image_cropper.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/image_picker.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/local_auth.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/location.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/map_launcher.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/maps_launcher.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/shared_preferences.framework",

@ -41,5 +41,9 @@
</array>
<key>UIViewControllerBasedStatusBarAppearance</key>
<false/>
<key>NSLocationAlwaysUsageDescription</key>
<string>Needed to access location</string>
<key>NSLocationWhenInUseUsageDescription</key>
<string>Needed to access location</string>
</dict>
</plist>

@ -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;
}
}

@ -5,12 +5,15 @@ import 'package:driverapp/core/model/orders/pending_orders_res_model.dart';
import 'package:driverapp/core/model/orders/update_order_status_request_model.dart';
import 'package:driverapp/core/model/scan_qr/scan_qr_request_model.dart';
import 'package:driverapp/core/service/base_service.dart';
import 'package:driverapp/core/model/orders/deliverd_order_req_model.dart';
class OrdersService extends BaseService {
List<PendingOrdersRes> _orders = List();
List<PendingOrdersRes> _nextOrdersList = List();
List<DeliverdOrderModel> _deliverdOrderList = List();
List<PendingOrdersRes> get orders => _orders;
List<DeliverdOrderModel> get deliverdOrderList => _deliverdOrderList;
List<PendingOrdersRes> get nextOrdersList => _nextOrdersList;
bool isOrderInserted;
@ -20,6 +23,15 @@ class OrdersService extends BaseService {
searchKey: "",
pageSize: 0,
pageIndex: 0,
latitude: "24.640000",
longitude: "46.753000",
);
DeliverdOrderModel _requestGetDeliverdOrders = DeliverdOrderModel(
searchKey: "",
pageSize: 0,
pageIndex: 0,
latitude: "24.640000",
longitude: "46.753000",
);
Future getPendingOrders() async {
@ -96,4 +108,25 @@ class OrdersService extends BaseService {
throw e;
}
}
Future getDeliverdList() async {
hasError = false;
try {
await baseAppClient.post(GET_ALL_DELIVERD_ORDER,
onSuccess: (dynamic response, int statusCode) {
_deliverdOrderList.clear();
response['PatientER_Delivery_GetAllDeliverdOrderList'].forEach((order) {
_deliverdOrderList.add(DeliverdOrderModel.fromJson(order));
});
}, onFailure: (String error, int statusCode) {
hasError = true;
super.error = error;
}, body: _requestGetPendingOrders.toJson());
} catch (e) {
hasError = true;
super.error = error;
throw e;
}
}
}

@ -69,11 +69,19 @@ class AuthenticationViewModel with ChangeNotifier {
isError = true;
notifyListeners();
} else {
sharedPref.setObject(
isLoading = false;
isError = false;
isLogin = true;
await sharedPref.setObject(
USER_PROFILE, _authenticationService.authenticatedUser);
sharedPref.setString(TOKEN, _authenticationService.token);
user = _authenticationService.authenticatedUser;
notifyListeners();
}
}
logout(){
sharedPref.clear();
notifyListeners();
}
}

@ -1,4 +1,5 @@
import 'package:driverapp/core/enum/viewstate.dart';
import 'package:driverapp/core/model/orders/deliverd_order_req_model.dart';
import 'package:driverapp/core/model/orders/next_order_request_model.dart';
import 'package:driverapp/core/model/orders/pending_orders_res_model.dart';
import 'package:driverapp/core/model/orders/update_order_status_request_model.dart';
@ -13,6 +14,9 @@ class OrdersViewModel extends BaseViewModel {
List<PendingOrdersRes> get orders => _ordersService.orders;
List<DeliverdOrderModel> get deliverdOrders =>
_ordersService.deliverdOrderList;
List<PendingOrdersRes> get nextOrdersList => _ordersService.nextOrdersList;
bool isBottomSheetAppear = false;
@ -26,6 +30,16 @@ class OrdersViewModel extends BaseViewModel {
setState(ViewState.Idle);
}
Future getDeliverdOrders() async {
setState(ViewState.Busy);
await _ordersService.getDeliverdList();
if (_ordersService.hasError) {
error = _ordersService.error;
setState(ViewState.Error);
} else
setState(ViewState.Idle);
}
Future insertOrder(ScanQrRequestModel _scanQrRequestModel) async {
setState(ViewState.ErrorLocal);
await _ordersService.insertOrder(_scanQrRequestModel);

@ -3,7 +3,6 @@ import 'package:get_it/get_it.dart';
import 'core/service/authentication_service.dart';
import 'core/service/hospital_service.dart';
import 'core/service/orders_service.dart';
import 'core/viewModels/authentication_view_model.dart';
import 'core/viewModels/hospital_view_model.dart';
import 'core/viewModels/orders_view_model.dart';
@ -18,6 +17,6 @@ void setupLocator() {
/// View Model
locator.registerFactory(() => HospitalViewModel());
locator.registerFactory(() => AuthenticationViewModel());
// locator.registerFactory(() => AuthenticationViewModel());
locator.registerFactory(() => OrdersViewModel());
}

@ -2,11 +2,9 @@ import 'package:driverapp/app-icons/driver_app_icons.dart';
import 'package:driverapp/core/model/authentication/login_request.dart';
import 'package:driverapp/core/viewModels/authentication_view_model.dart';
import 'package:driverapp/core/viewModels/project_view_model.dart';
import 'package:driverapp/pages/dashboard/dashboard_screen.dart';
import 'package:driverapp/uitl/translations_delegate_base.dart';
import 'package:driverapp/uitl/utils.dart';
import 'package:driverapp/widgets/buttons/secondary_button.dart';
import 'package:driverapp/widgets/data_display/circle-container.dart';
import 'package:driverapp/widgets/input/text_field.dart';
import 'package:driverapp/widgets/others/app_scaffold_widget.dart';
import 'package:flutter/cupertino.dart';
@ -25,6 +23,17 @@ class LoginPage extends StatelessWidget {
Widget build(BuildContext context) {
projectViewModel = Provider.of(context);
authenticationViewModel = Provider.of(context);
login() async {
if (loginFormKey.currentState.validate()) {
loginFormKey.currentState.save();
await authenticationViewModel.login(loginRequest);
if (authenticationViewModel.isError) {
Utils.showErrorToast(authenticationViewModel.error);
}
}
}
return AnimatedSwitcher(
duration: Duration(microseconds: 350),
child: AppScaffold(
@ -237,7 +246,7 @@ class LoginPage extends StatelessWidget {
SecondaryButton(
label: TranslationBase.of(context).login,
onTap: () {
login(context);
login();
},
disabled: authenticationViewModel.isLoading,
loading: authenticationViewModel.isLoading,
@ -255,17 +264,4 @@ class LoginPage extends StatelessWidget {
);
}
login(BuildContext context) async {
if (loginFormKey.currentState.validate()) {
loginFormKey.currentState.save();
await authenticationViewModel.login(loginRequest);
if (authenticationViewModel.isError) {
Utils.showErrorToast(authenticationViewModel.error);
} else {
Navigator.push(
context,
MaterialPageRoute(builder: (context) => DashboardScreen()));
}
}
}
}

@ -18,6 +18,7 @@ import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:hexcolor/hexcolor.dart';
import 'package:provider/provider.dart';
import 'package:driverapp/pages/orders/deliverd_orders_page.dart';
import '../base/base_view.dart';
@ -74,7 +75,6 @@ class _DashboardScreenState extends State<DashboardScreen> {
padding: EdgeInsets.only(top: 4.5),
child: Text(
_authenticationViewModel.user.userName,
//model.user.userName,
style: TextStyle(
fontWeight: FontWeight.w400,
fontSize: 25.0),
@ -92,7 +92,7 @@ class _DashboardScreenState extends State<DashboardScreen> {
child: Column(
children: <Widget>[
InkWell(
child: CircleAvatar(
child:CircleAvatar(
radius: 25.5,
backgroundColor: Color(0xff30B7B9),
child: CircleAvatar(
@ -101,8 +101,7 @@ class _DashboardScreenState extends State<DashboardScreen> {
child: Image.asset(
'assets/images/driver.png',
fit: BoxFit.contain,
),
),
),),
),
onTap: (){
Navigator.push(
@ -248,8 +247,15 @@ class _DashboardScreenState extends State<DashboardScreen> {
Color(0xff49C1BC)
]),
),
child: InkWell(
onTap: () => Navigator.push(
context,
MaterialPageRoute(
builder: (context) =>
DeliverdOrdersPage())),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
mainAxisAlignment:
MainAxisAlignment.spaceBetween,
children: <Widget>[
Expanded(
child: Padding(
@ -336,6 +342,7 @@ class _DashboardScreenState extends State<DashboardScreen> {
],
),
),
),
)
],
),
@ -590,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,

@ -9,6 +9,7 @@ import 'package:driverapp/widgets/buttons/secondary_button.dart';
import 'package:driverapp/widgets/delivery/customer_brief_card.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:location/location.dart';
import '../../uitl/translations_delegate_base.dart';
import '../../widgets/others/app_scaffold_widget.dart';
@ -45,7 +46,8 @@ class DeliveryConfirmedPage extends StatelessWidget {
top: MediaQuery.of(context).size.width * 0.12,
),
decoration: BoxDecoration(
color: Colors.white10, shape: BoxShape.circle),
color: Colors.white10,
shape: BoxShape.circle),
child: Column(
children: <Widget>[
Icon(
@ -55,7 +57,8 @@ class DeliveryConfirmedPage extends StatelessWidget {
),
SizedBox(
height:
MediaQuery.of(context).size.width * 0.03,
MediaQuery.of(context).size.width *
0.03,
),
Text(
TranslationBase.of(context).deliveryInfo,
@ -132,10 +135,13 @@ class DeliveryConfirmedPage extends StatelessWidget {
Container(
margin: EdgeInsets.all(10),
child: SecondaryButton(
label: TranslationBase.of(context).nextDelivery,
label: TranslationBase
.of(context)
.nextDelivery,
loading: model.state == ViewState.BusyLocal,
onTap: () {
getNextOrder(context, model);
},),
getNextOrder(context, model);},
),
),
],
),
@ -158,7 +164,8 @@ class DeliveryConfirmedPage extends StatelessWidget {
),
],
),
],),
],
),
),
),
),
@ -166,11 +173,15 @@ class DeliveryConfirmedPage extends StatelessWidget {
}
getNextOrder(BuildContext context, OrdersViewModel model) async {
model.setState(ViewState.BusyLocal);
LocationData loc = await Utils.getLocation();
NextOrderRequestModel nextOrderRequestModel = NextOrderRequestModel(
pageIndex: 0,
pageSize: 0,
latitude: "46.621730",
longitude: "24.797682",
latitude: loc.latitude.toString(),
//"46.621730",
longitude: loc.longitude.toString(),
//"24.797682",
searchKey: "");
await model.nextOrder(nextOrderRequestModel);
if (model.state == ViewState.ErrorLocal) {

File diff suppressed because one or more lines are too long

@ -0,0 +1,147 @@
import 'package:driverapp/core/viewModels/orders_view_model.dart';
import 'package:driverapp/pages/delivery/information_page.dart';
import 'package:driverapp/uitl/translations_delegate_base.dart';
import 'package:driverapp/widgets/data_display/circle-container.dart';
import 'package:driverapp/widgets/others/app_scaffold_widget.dart';
import 'package:driverapp/widgets/others/rounded_container.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import '../base/base_view.dart';
class DeliverdOrdersPage extends StatefulWidget {
@override
_DeliverdOrdersPageState createState() => _DeliverdOrdersPageState();
}
class _DeliverdOrdersPageState extends State<DeliverdOrdersPage> {
@override
Widget build(BuildContext context) {
return BaseView<OrdersViewModel>(
onModelReady: (model) => model.getDeliverdOrders(),
builder: (BuildContext context, OrdersViewModel model, Widget child) =>
AppScaffold(
isShowAppBar: true,
appBarTitle: TranslationBase.of(context).yourDeliveryQue,
titleColor: Colors.black,
body: Column(
children: <Widget>[
Expanded(
child: ListView.builder(
shrinkWrap: true,
scrollDirection: Axis.vertical,
itemCount: model.orders == null ? 0 : model.orders.length,
itemBuilder: (BuildContext context, int index) {
return Padding(
padding: EdgeInsets.symmetric(horizontal: 12.2),
child: InkWell(
child: RoundedContainer(
raduis: 25.0,
height: MediaQuery.of(context).orientation ==
Orientation.portrait
? MediaQuery.of(context).size.height * 0.120
: MediaQuery.of(context).size.height * 0.209,
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: <Widget>[
Expanded(
flex: 1,
child: Column(
mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
Padding(
padding:
EdgeInsets.only(left: 15.0, top: 14.0),
child: Image.asset(
'assets/images/location.png',
height: MediaQuery.of(context)
.orientation ==
Orientation.portrait
? MediaQuery.of(context).size.height *
0.06
: MediaQuery.of(context).size.height *
0.11,
width: MediaQuery.of(context)
.orientation ==
Orientation.portrait
? MediaQuery.of(context).size.width *
0.05
: MediaQuery.of(context).size.width *
0.09,
),
)
],
),
),
if (model.orders.length != 0)
Expanded(
flex: 5,
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
Padding(
padding: EdgeInsets.only(top: 20.0),
child: 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(
model.orders[index].orderID.toString(),
style: TextStyle(
fontSize: 18.0,
fontWeight: FontWeight.w400,
letterSpacing: 8.0),
),
),
],
),
),
Padding(
padding: EdgeInsets.all(8.0),
child: CircleContainer(
borderWidth: 0.8,
child: Text(
model.orders[index].distanceInKilometers
.toString() +
' K.m\naway',
style: TextStyle(
color: Color(0xff42B6AD),
fontWeight: FontWeight.w800,
fontStyle: FontStyle.normal),
),
),
),
],
),
),
onTap: () {
Navigator.push(
context,
MaterialPageRoute(
builder: (context) =>
InformationPage(model.orders[index])));
},
),
);
},
),
),
],
),
),
);
}
}

@ -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,

@ -109,7 +109,10 @@ class SettingPage extends StatelessWidget {
),
],
),
onTap: (){},
onTap: (){
// AuthenticationViewModel.logout();
// Navigator.of(context).pushNamedAndRemoveUntil('/', ModalRoute.withName('/'));
},
),
SizedBox(height: MediaQuery.of(context).size.width*0.05,),
InkWell(

@ -1,5 +1,6 @@
import 'package:connectivity/connectivity.dart';
import 'package:flutter/cupertino.dart';
import 'package:location/location.dart';
import 'app_shared_preferences.dart';
import 'app_toast.dart';
@ -42,4 +43,10 @@ class Utils {
static hideKeyboard(BuildContext context) {
FocusScope.of(context).unfocus();
}
static getLocation() async {
Location location = new Location();
LocationData currentLocation = await location.getLocation();
return currentLocation;
}
}

@ -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,
),
);
}

@ -1,3 +1,4 @@
import 'package:driverapp/widgets/data_display/circle-container.dart';
import 'package:flutter/material.dart';
import '../../uitl/date_uitl.dart';
@ -16,8 +17,8 @@ class CustomerBriefCard extends StatelessWidget {
final double latitude;
final bool showDistance;
CustomerBriefCard(
{this.itemId,
CustomerBriefCard({
this.itemId,
this.time,
this.customerFirstName,
this.customerLastName,
@ -34,7 +35,9 @@ class CustomerBriefCard extends StatelessWidget {
Widget build(BuildContext context) {
return Center(
child: Container(
width: 350,
width: MediaQuery.of(context).orientation == Orientation.landscape
? 580
: 370,
height: 270,
decoration: BoxDecoration(
color: Colors.white,
@ -63,46 +66,45 @@ class CustomerBriefCard extends StatelessWidget {
flex: 3,
child: Text(
'ID: ${itemId}',
style: TextStyle(color: Color(0xFFADACAD)),
),
),
Visibility(
visible: showDistance,
child: Expanded(
child: CircleAvatar(
backgroundColor: Colors.black45,
radius: 28.0,
child: CircleAvatar(
backgroundColor: Colors.white,
maxRadius: 26.1,
child: Padding(
padding: const EdgeInsets.only(left: 3),
child: Text(
'3 K.m \n away',
style: TextStyle(
color: Color(0xff30B7B9),
fontSize: 12.5,
fontWeight: FontWeight.w600),
color: Color(0xFFADACAD),
fontWeight: FontWeight.w800,
fontSize: 17.5),
),
),
Expanded(
child: Padding(
padding: EdgeInsets.all(8.0),
child: CircleContainer(
borderWidth: 0.9,
child: Text(
'0 K.m\naway',
style: TextStyle(
color: Color(0xff42B6AD),
fontWeight: FontWeight.w800,
fontStyle: FontStyle.normal),
),
),
),
),
],
),
SizedBox(height: MediaQuery.of(context).size.width * 0.02,),
SizedBox(
height: MediaQuery.of(context).size.width * 0.02,
),
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,
),
SizedBox(height: MediaQuery.of(context).size.width * 0.019,),
Text(
mobileNo,
style: TextStyle(color: Color(0xFF50BDC5)),
),
SizedBox(
height:MediaQuery.of(context).size.width*0.005,
height: MediaQuery.of(context).size.width * 0.005,
),
// Text(
// 'Olaya street, behind KFC resturant, next to kingdom towers 2nd floor ofice 277',
@ -143,13 +145,13 @@ class CustomerBriefCard extends StatelessWidget {
child: Text(
totalPayment.toString(),
textAlign: TextAlign.end,
style: TextStyle(fontWeight: FontWeight.w600),
style: TextStyle(fontWeight: FontWeight.w400),
),
),
],
),
SizedBox(
height: MediaQuery.of(context).size.width*0.03,
height: MediaQuery.of(context).size.width * 0.03,
),
Row(
children: <Widget>[
@ -164,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(
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(

@ -67,9 +67,14 @@ dependencies:
# Qr code Scanner
barcode_scan: ^3.0.1
#mape
# map
map_launcher: ^0.12.0
# location
location: ^3.0.2

Loading…
Cancel
Save