updates & fixes

merge-update-with-lab-changes
haroon amjad 3 years ago
parent 7ae4e7d616
commit f6191d9bf7

@ -101,7 +101,7 @@ class TodoList{
// R052
to_do_list_nfc_cancel(AppoitmentAllHistoryResultList appointment){
logger('to_do_list_nfc_cancel', parameters: {
'appointment_type' : appointment.isLiveCareAppointment ? 'livecare' : 'regular',
'appointment_type' : appointment.isLiveCareAppointment != null ? appointment.isLiveCareAppointment ? 'livecare' : 'regular' : 'regular',
'clinic_type_online' : appointment.clinicName,
'hospital_name' : appointment.projectName,
'doctor_name' : (appointment.doctorName == null || appointment.doctorName == '') ? appointment.doctorNameObj : appointment.doctorName,

@ -121,7 +121,7 @@ class DoctorProfileList {
doctorCases = json['DoctorCases'];
doctorPicture = json['DoctorPicture'];
doctorProfileInfo = json['DoctorProfileInfo'];
specialty = json['Specialty'].cast<String>();
specialty = json['Specialty'] != null ? json['Specialty'].cast<String>() : [""];
actualDoctorRate = json['ActualDoctorRate'];
doctorImageURL = json['DoctorImageURL'];
doctorRate = json['DoctorRate'];

@ -104,7 +104,7 @@ class DoctorInformation extends StatelessWidget {
),
mHeight(10),
Text(
docProfileList.doctorProfileInfo,
docProfileList.doctorProfileInfo != null ? docProfileList.doctorProfileInfo : "",
style: TextStyle(
fontSize: 12,
letterSpacing: -0.48,

@ -29,6 +29,7 @@ import 'package:diplomaticquarterapp/pages/paymentService/payment_service.dart';
import 'package:diplomaticquarterapp/services/authentication/auth_provider.dart';
import 'package:diplomaticquarterapp/theme/colors.dart';
import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart';
import 'package:diplomaticquarterapp/uitl/location_util.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/uitl/utils_new.dart';
import 'package:diplomaticquarterapp/widgets/dialogs/covid_consent_dialog.dart';
@ -47,6 +48,7 @@ class ServicesView extends StatelessWidget {
AuthenticatedUser authUser = new AuthenticatedUser();
AuthProvider authProvider = new AuthProvider();
PharmacyModuleViewModel pharmacyModuleViewModel = locator<PharmacyModuleViewModel>();
LocationUtils locationUtils;
ServicesView(this.hmgServices, this.index);
@ -55,10 +57,7 @@ class ServicesView extends StatelessWidget {
return InkWell(
onTap: () {
if (index == 0) {
locator<GAnalytics>().hmgServices.logServiceName('live care service');
Navigator.push(context, FadePage(page: LiveCareHome())).then((value) {
LiveCareHome.isLiveCareTypeSelected = false;
});
openLiveCare(context);
} else if (index == 1) {
showCovidDialog(context);
locator<GAnalytics>().hmgServices.logServiceName('covid-test drive-thru');
@ -296,6 +295,17 @@ class ServicesView extends StatelessWidget {
}
}
openLiveCare(BuildContext context) {
locationUtils = new LocationUtils(isShowConfirmDialog: true, context: context);
locationUtils.getCurrentLocation(callBack: (value) {
print(value);
locator<GAnalytics>().hmgServices.logServiceName('live care service');
Navigator.push(context, FadePage(page: LiveCareHome())).then((value) {
LiveCareHome.isLiveCareTypeSelected = false;
});
});
}
getPharmacyToken(BuildContext context) async {
if (!authProvider.isLogin) {
Navigator.push(context, FadePage(page: LandingPagePharmacy()));

@ -31,11 +31,11 @@ class LocationUtils {
if (Platform.isAndroid && isHuawei) {
_getHMSCurrentLocation(callBack);
} else {
Geolocator.isLocationServiceEnabled().then((value) {
Geolocator.isLocationServiceEnabled().then((value) async {
if (value) {
Geolocator.checkPermission().then((permission) async {
await Geolocator.checkPermission().then((permission) async {
if (permission == LocationPermission.always || permission == LocationPermission.whileInUse) {
Geolocator.getCurrentPosition(desiredAccuracy: LocationAccuracy.medium, timeLimit: Duration(seconds: 10)).then((value) {
Geolocator.getCurrentPosition(desiredAccuracy: LocationAccuracy.low, timeLimit: Duration(seconds: 10)).then((value) {
setLocation(value);
if (callBack != null) callBack(LatLng(value.latitude, value.longitude));
});
@ -51,7 +51,7 @@ class LocationUtils {
});
} else {
if (await Permission.location.request().isGranted) {
getCurrentLocation();
getCurrentLocation(callBack: callBack);
} else {
setZeroLocation();
if (isShowConfirmDialog) showErrorLocationDialog(false);
@ -118,7 +118,7 @@ class LocationUtils {
confirmMessage: TranslationBase.of(context).locationDialogMessage,
okText: TranslationBase.of(context).confirm,
cancelText: TranslationBase.of(context).cancel_nocaps,
okFunction: () => {ConfirmDialog.closeAlertDialog(context), if (isPermissionError) Geolocator.openAppSettings() else Geolocator.openLocationSettings(), Navigator.of(context).pop()},
okFunction: () => {ConfirmDialog.closeAlertDialog(context), if (isPermissionError) Geolocator.openAppSettings() else Geolocator.openLocationSettings(), Navigator.of(context).canPop()},
cancelFunction: () => {});
return dialog.showAlertDialog(context);
}

@ -169,7 +169,9 @@ class _NfcLayoutState extends State<NfcLayout> {
// widget.onNcfScan(nfcId);
// Navigator.pop(context);
// },
onPressed: null,
onPressed: () {
Navigator.pop(context);
},
elevation: 0,
child: Text("DONE"),
),

Loading…
Cancel
Save