Analytics statements align to bottom of block

merge-requests/602/head
Zohaib Iqbal Kambrani 4 years ago
parent 1523fd5ade
commit 1c6a62776c

@ -271,19 +271,18 @@ class _BookConfirmState extends State<BookConfirm> {
insertAppointment(context, DoctorList docObject, int initialSlotDuration) {
final timeSlot = DocAvailableAppointments.selectedAppoDateTime;
projectViewModel.analytics.appointment.book_appointment_click_confirm(appointment_type: 'regular', dateTime: timeSlot, doctor: widget.doctor);
GifLoaderDialogUtils.showMyDialog(context);
AppoitmentAllHistoryResultList appo;
widget.service.insertAppointment(docObject.doctorID, docObject.clinicID, docObject.projectID, widget.selectedTime, widget.selectedDate, initialSlotDuration, context, null, null, null, projectViewModel).then((res) {
if (res['MessageStatus'] == 1) {
projectViewModel.analytics.appointment.book_appointment_confirmation_success(appointment_type: 'regular', dateTime: timeSlot, doctor: widget.doctor);
AppToast.showSuccessToast(message: TranslationBase.of(context).bookedSuccess);
Future.delayed(new Duration(milliseconds: 500), () {
getPatientShare(context, res['AppointmentNo'], docObject.clinicID, docObject.projectID, docObject);
getToDoCount();
});
projectViewModel.analytics.appointment.book_appointment_confirmation_success(appointment_type: 'regular', dateTime: timeSlot, doctor: widget.doctor);
} else {
GifLoaderDialogUtils.hideDialog(context);
appo = new AppoitmentAllHistoryResultList();
@ -312,17 +311,16 @@ class _BookConfirmState extends State<BookConfirm> {
AppToast.showErrorToast(message: err);
print(err);
});
projectViewModel.analytics.appointment.book_appointment_click_confirm(appointment_type: 'regular', dateTime: timeSlot, doctor: widget.doctor);
}
insertLiveCareScheduledAppointment(context, DoctorList docObject) {
final timeSlot = DocAvailableAppointments.selectedAppoDateTime;
projectViewModel.analytics.appointment.book_appointment_click_confirm(appointment_type: 'livecare', dateTime: timeSlot, doctor: widget.doctor);
GifLoaderDialogUtils.showMyDialog(context);
AppoitmentAllHistoryResultList appo;
widget.service.insertLiveCareScheduleAppointment(docObject.doctorID, docObject.clinicID, docObject.projectID, docObject.serviceID, widget.selectedTime, widget.selectedDate, context).then((res) {
if (res['MessageStatus'] == 1) {
projectViewModel.analytics.appointment.book_appointment_confirmation_success(appointment_type: 'livecare', dateTime: timeSlot, doctor: widget.doctor);
AppToast.showSuccessToast(message: TranslationBase.of(context).bookedSuccess);
print(res['AppointmentNo']);
@ -330,6 +328,7 @@ class _BookConfirmState extends State<BookConfirm> {
getLiveCareAppointmentPatientShare(context, res['AppointmentNo'], docObject.clinicID, docObject.projectID, docObject);
getToDoCount();
});
projectViewModel.analytics.appointment.book_appointment_confirmation_success(appointment_type: 'livecare', dateTime: timeSlot, doctor: widget.doctor);
} else {
GifLoaderDialogUtils.hideDialog(context);
appo = new AppoitmentAllHistoryResultList();
@ -358,6 +357,8 @@ class _BookConfirmState extends State<BookConfirm> {
AppToast.showErrorToast(message: err);
print(err);
});
projectViewModel.analytics.appointment.book_appointment_click_confirm(appointment_type: 'livecare', dateTime: timeSlot, doctor: widget.doctor);
}
getToDoCount() {

@ -198,8 +198,8 @@ class _BookSuccessState extends State<BookSuccess> {
disabledTextColor: Colors.white,
disabledColor: new Color(0xFFbcc2c4),
onPressed: () {
projectViewModel.analytics.appointment.pay_now_for_appointment(appointment_type: 'regular', doctorDetail: widget.docObject, payNow: true);
startPaymentProcess();
projectViewModel.analytics.appointment.pay_now_for_appointment(appointment_type: 'regular', doctorDetail: widget.docObject, payNow: true);
},
child: Text(TranslationBase.of(context).payNow.toUpperCase(), style: TextStyle(fontSize: 18.0)),
),
@ -220,8 +220,8 @@ class _BookSuccessState extends State<BookSuccess> {
disabledTextColor: Colors.white,
disabledColor: new Color(0xFFbcc2c4),
onPressed: () {
projectViewModel.analytics.appointment.pay_now_for_appointment(appointment_type: 'regular', doctorDetail: widget.docObject, payNow: false);
navigateToHome(context);
projectViewModel.analytics.appointment.pay_now_for_appointment(appointment_type: 'regular', doctorDetail: widget.docObject, payNow: false);
},
child: Text(TranslationBase.of(context).payLater.toUpperCase(), style: TextStyle(fontSize: 18.0)),
),
@ -538,8 +538,8 @@ class _BookSuccessState extends State<BookSuccess> {
setState(() {});
}))).then((value) {
if (value != null) {
projectViewModel.analytics.appointment.payment_method(appointment_type: 'regular', clinic: widget.docObject.clinicName, payment_method: value[0], payment_type: 'appointment');
openPayment(value, authUser, double.parse(patientShareResponse.patientShareWithTax.toString()), patientShareResponse, appo);
projectViewModel.analytics.appointment.payment_method(appointment_type: 'regular', clinic: widget.docObject.clinicName, payment_method: value[0], payment_type: 'appointment');
}
});
}
@ -604,9 +604,9 @@ class _BookSuccessState extends State<BookSuccess> {
String amount = res['Amount'];
String payment_method = res['PaymentMethod'];
final currency = projectViewModel.user.outSA == 0 ? "sar" : 'aed';
createAdvancePayment(res, appo);
projectViewModel.analytics.appointment.payment_success(
appointment_type: 'regular', payment_method: payment_method, clinic: appo.clinicName, hospital: appo.projectName, txn_amount: "$amount", txn_currency: currency, txn_number: txn_ref);
createAdvancePayment(res, appo);
} else {
GifLoaderDialogUtils.hideDialog(context);
AppToast.showErrorToast(message: res['Response_Message']);

@ -127,7 +127,6 @@ class _DoctorProfileState extends State<DoctorProfile> with TickerProviderStateM
showConfirmMessageDialog: false,
isNeedToShowButton: !widget.isLiveCareAppointment,
onTap: () {
projectViewModel.analytics.appointment.book_appointment_schedule(appointment_type: 'regular', doctor: widget.doctor);
Navigator.push(
context,
FadePage(
@ -142,6 +141,7 @@ class _DoctorProfileState extends State<DoctorProfile> with TickerProviderStateM
this.doctorSchedule = value;
});
});
projectViewModel.analytics.appointment.book_appointment_schedule(appointment_type: 'regular', doctor: widget.doctor);
},
onRatingAndReviewTap: () {
getDoctorRatingsDetails();
@ -497,8 +497,8 @@ class _DoctorProfileState extends State<DoctorProfile> with TickerProviderStateM
if (DocAvailableAppointments.areSlotsAvailable) {
if (await sharedPref.getObject(USER_PROFILE) != null) {
final timeSlot = DocAvailableAppointments.selectedAppoDateTime;
projectViewModel.analytics.appointment.book_appointment_review(appointment_type: 'regular', dateTime: timeSlot, doctor: widget.doctor);
navigateToBookConfirm(context);
projectViewModel.analytics.appointment.book_appointment_review(appointment_type: 'regular', dateTime: timeSlot, doctor: widget.doctor);
} else {
ConfirmDialog dialog = new ConfirmDialog(
context: context,

@ -175,8 +175,8 @@ class _BookReminderPageState extends State<BookReminderPage> {
disabledTextColor: Colors.white,
disabledColor: new Color(0xFFEAEAEA),
onPressed: () {
projectViewModel.analytics.appointment.appointment_reminder(false);
navigateToBookSuccess(context);
projectViewModel.analytics.appointment.appointment_reminder(false);
},
child: Text(TranslationBase.of(context).no, style: TextStyle(fontSize: 16.0, letterSpacing: -0.48)),
),
@ -197,7 +197,6 @@ class _BookReminderPageState extends State<BookReminderPage> {
disabledTextColor: Colors.white,
disabledColor: CustomColors.green,
onPressed: () async {
projectViewModel.analytics.appointment.appointment_reminder(true);
print(widget.patientShareResponse.appointmentNo);
showReminderDialog(
context,
@ -211,6 +210,7 @@ class _BookReminderPageState extends State<BookReminderPage> {
navigateToBookSuccess(context);
},
);
projectViewModel.analytics.appointment.appointment_reminder(true);
},
child: Text(TranslationBase.of(context).yes, style: TextStyle(fontSize: 16.0, letterSpacing: -0.48)),
),

@ -262,13 +262,13 @@ class _DocAvailableAppointmentsState extends State<DocAvailableAppointments> wit
onPressed: () {
final timeslot = dayEvents[index];
DocAvailableAppointments.selectedAppoDateTime = timeslot.end;
projectViewModel.analytics.appointment.book_appointment_time_selection(appointment_type: 'regular', dateTime: timeslot.end, doctor: widget.doctor);
setState(() {
selectedButtonIndex = index;
DocAvailableAppointments.selectedTime = dayEvents[index].isoTime;
print(DocAvailableAppointments.selectedTime);
});
projectViewModel.analytics.appointment.book_appointment_time_selection(appointment_type: 'regular', dateTime: timeslot.end, doctor: widget.doctor);
},
child: Text(dayEvents[index].isoTime, style: TextStyle(fontSize: 12.0)),
);

@ -230,7 +230,6 @@ class _SearchByClinicState extends State<SearchByClinic> {
onTap: () {
showClickListDialog(context, clinicsList, onSelection: (ListClinicCentralized clincs) {
selectedClinic = clincs;
projectViewModel.analytics.appointment.book_appointment_select_clinic(appointment_type: 'regular', clinic: clincs.clinicDescription);
Navigator.pop(context);
setState(() {
dropdownTitle = clincs.clinicDescription;
@ -244,6 +243,7 @@ class _SearchByClinicState extends State<SearchByClinic> {
} else {
}
});
projectViewModel.analytics.appointment.book_appointment_select_clinic(appointment_type: 'regular', clinic: clincs.clinicDescription);
});
},
child: Container(

@ -147,8 +147,8 @@ class _SearchByDoctorState extends State<SearchByDoctor> {
}
_searchDoctor(BuildContext context) {
projectViewModel.analytics.appointment.book_appointment_doctor_search(query: doctorNameController.text);
getDoctorsList(context);
projectViewModel.analytics.appointment.book_appointment_doctor_search(query: doctorNameController.text);
}
navigateToSearchResults(context, List<DoctorList> docList, List<PatientDoctorAppointmentList> patientDoctorAppointmentListHospital) {

@ -77,7 +77,6 @@ Future<void> _showReminderDialog(BuildContext context, DateTime dateTime, String
text = "2 hours";
}
locator<GAnalytics>().appointment.appointment_reminder_time(reminde_before: text);
if (onMultiDateSuccess == null) {
CalendarUtils calendarUtils = await CalendarUtils.getInstance();
calendarUtils
@ -92,6 +91,7 @@ Future<void> _showReminderDialog(BuildContext context, DateTime dateTime, String
} else {
onMultiDateSuccess(i);
}
locator<GAnalytics>().appointment.appointment_reminder_time(reminde_before: text);
},
),
);

@ -572,9 +572,9 @@ class _AppointmentDetailsState extends State<AppointmentDetails> with SingleTick
service.confirmAppointment(widget.appo.appointmentNo, widget.appo.clinicID, widget.appo.projectID, widget.appo.isLiveCareAppointment, context).then((res) {
GifLoaderDialogUtils.hideDialog(context);
if (res['MessageStatus'] == 1) {
projectViewModel.analytics.appointment.appointment_details_confirm(appointment: widget.appo);
AppToast.showSuccessToast(message: res['ErrorEndUserMessage']);
Navigator.of(context).pop();
projectViewModel.analytics.appointment.appointment_details_confirm(appointment: widget.appo);
} else {
AppToast.showErrorToast(message: res['ErrorEndUserMessage']);
}
@ -605,7 +605,6 @@ class _AppointmentDetailsState extends State<AppointmentDetails> with SingleTick
GifLoaderDialogUtils.showMyDialog(context);
DoctorsListService service = new DoctorsListService();
service.cancelAppointment(widget.appo, context).then((res) {
projectViewModel.analytics.appointment.appointment_details_cancel(appointment: widget.appo);
GifLoaderDialogUtils.hideDialog(context);
if (res['MessageStatus'] == 1) {
checkIfHasReminder();
@ -615,6 +614,7 @@ class _AppointmentDetailsState extends State<AppointmentDetails> with SingleTick
} else {
AppToast.showErrorToast(message: res['ErrorEndUserMessage']);
}
projectViewModel.analytics.appointment.appointment_details_cancel(appointment: widget.appo);
}).catchError((err) {
GifLoaderDialogUtils.hideDialog(context);
print(err);

@ -98,8 +98,8 @@ class _SchedulePageState extends State<SchedulePage> {
itemBuilder: (context, index2) => InkWell(
onTap: () {
final weekDay = weeks[index][index2]['DayName'];
projectViewModel.analytics.appointment.book_appointment_date_selection(appointment_type: 'regular', day: weekDay, doctor: doctorList);
openBookAppointment(weeks[index][index2]);
projectViewModel.analytics.appointment.book_appointment_date_selection(appointment_type: 'regular', day: weekDay, doctor: doctorList);
},
child: Row(
children: [

@ -98,18 +98,17 @@ class _AppointmentActionsState extends State<AppointmentActions> {
_handleButtonClicks(AppoDetailsButton, ToDoCountProviderModel model) {
switch (AppoDetailsButton.caller) {
case "openReschedule":
locator<GAnalytics>().appointment.appointment_detail_action(appointment: widget.appo, action: 'reschedule appointment');
widget.tabController.animateTo((widget.tabController.index + 1) % 2);
setState(() {
widget.enableFooterButton();
});
locator<GAnalytics>().appointment.appointment_detail_action(appointment: widget.appo, action: 'reschedule appointment');
break;
case "navigateToProject":
locator<GAnalytics>().appointment.appointment_detail_action(appointment: widget.appo, action: 'hospital location');
openMap(double.parse(widget.appo.latitude), double.parse(widget.appo.longitude));
locator<GAnalytics>().appointment.appointment_detail_action(appointment: widget.appo, action: 'hospital location');
break;
case "addReminder":
locator<GAnalytics>().appointment.appointment_detail_action(appointment: widget.appo, action: 'add reminder');
showReminderDialog(
context,
DateUtil.convertStringToDate(widget.appo.appointmentDate),
@ -121,45 +120,46 @@ class _AppointmentActionsState extends State<AppointmentActions> {
AppToast.showSuccessToast(message: TranslationBase.of(context).reminderSuccess);
},
);
locator<GAnalytics>().appointment.appointment_detail_action(appointment: widget.appo, action: 'add reminder');
break;
case "goToTodoList":
// Navigator.of(context).pop();
locator<GAnalytics>().appointment.appointment_detail_action(appointment: widget.appo, action: 'todo list');
navigateToToDoPage(context, model);
locator<GAnalytics>().appointment.appointment_detail_action(appointment: widget.appo, action: 'todo list');
break;
case "askDoc":
locator<GAnalytics>().appointment.appointment_detail_action(appointment: widget.appo, action: 'ask doctor');
askYourDoc();
locator<GAnalytics>().appointment.appointment_detail_action(appointment: widget.appo, action: 'ask doctor');
break;
case "radiology":
locator<GAnalytics>().appointment.appointment_detail_action(appointment: widget.appo, action: 'radiology');
openAppointmentRadiology();
locator<GAnalytics>().appointment.appointment_detail_action(appointment: widget.appo, action: 'radiology');
break;
case "labResult":
locator<GAnalytics>().appointment.appointment_detail_action(appointment: widget.appo, action: 'lab result');
openAppointmentLabResults();
locator<GAnalytics>().appointment.appointment_detail_action(appointment: widget.appo, action: 'lab result');
break;
case "prescriptions":
locator<GAnalytics>().appointment.appointment_detail_action(appointment: widget.appo, action: 'prescriptions');
openPrescriptionReport();
locator<GAnalytics>().appointment.appointment_detail_action(appointment: widget.appo, action: 'prescriptions');
break;
case "Survey":
locator<GAnalytics>().appointment.appointment_detail_action(appointment: widget.appo, action: 'survey');
rateAppointment();
locator<GAnalytics>().appointment.appointment_detail_action(appointment: widget.appo, action: 'survey');
break;
case "Insurance":
locator<GAnalytics>().appointment.appointment_detail_action(appointment: widget.appo, action: 'insurance');
navigateToInsuranceApprovals(widget.appo.appointmentNo);
locator<GAnalytics>().appointment.appointment_detail_action(appointment: widget.appo, action: 'insurance');
break;
case "VitalSigns":
locator<GAnalytics>().appointment.appointment_detail_action(appointment: widget.appo, action: 'vital sign');
navigateToVitalSigns(widget.appo.appointmentNo, widget.appo.projectID);
locator<GAnalytics>().appointment.appointment_detail_action(appointment: widget.appo, action: 'vital sign');
break;
case "insertComplaint":
locator<GAnalytics>().appointment.appointment_detail_action(appointment: widget.appo, action: 'raise complaint');
navigateToInsertComplaint();
locator<GAnalytics>().appointment.appointment_detail_action(appointment: widget.appo, action: 'raise complaint');
break;
}
}

@ -640,11 +640,11 @@ class _ToDoState extends State<ToDo> with SingleTickerProviderStateMixin {
}
Future navigateToAppointmentDetails(context, AppoitmentAllHistoryResultList appo) async {
projectViewModel.analytics.todoList.to_do_list_more_details(appo);
GAnalytics.APPOINTMENT_DETAIL_FLOW_TYPE = 'todo list';
Navigator.push(context, FadePage(page: AppointmentDetails(appo: appo, parentIndex: appo.patientStatusType == 42 ? 1 : 0))).then((value) {
getPatientAppointmentHistory();
});
projectViewModel.analytics.todoList.to_do_list_more_details(appo);
}
getOBGyneOrdersList() {
@ -798,8 +798,8 @@ class _ToDoState extends State<ToDo> with SingleTickerProviderStateMixin {
DoctorsListService service = new DoctorsListService();
service.generateAppointmentQR(patientShareResponse, context).then((res) {
GifLoaderDialogUtils.hideDialog(context);
projectViewModel.analytics.todoList.to_do_list_check_in(appo);
navigateToQR(context, res['AppointmentQR'], patientShareResponse, appo);
projectViewModel.analytics.todoList.to_do_list_check_in(appo);
}).catchError((err) {
GifLoaderDialogUtils.hideDialog(context);
print(err);
@ -813,7 +813,6 @@ class _ToDoState extends State<ToDo> with SingleTickerProviderStateMixin {
}
openPaymentDialog(AppoitmentAllHistoryResultList appo, PatientShareResponse patientShareResponse) {
projectViewModel.analytics.todoList.to_do_list_pay_now(appo);
showGeneralDialog(
barrierColor: Colors.black.withOpacity(0.5),
transitionBuilder: (context, a1, a2, widget) {
@ -833,12 +832,14 @@ class _ToDoState extends State<ToDo> with SingleTickerProviderStateMixin {
pageBuilder: (context, animation1, animation2) {})
.then((value) {
if (value != null) {
projectViewModel.analytics.todoList.to_do_list_confirm_payment_details(appo);
navigateToPaymentMethod(context, value, appo);
projectViewModel.analytics.todoList.to_do_list_confirm_payment_details(appo);
} else {
projectViewModel.analytics.todoList.to_do_list_cancel_payment_details(appo);
}
});
projectViewModel.analytics.todoList.to_do_list_pay_now(appo);
}
openPayment(List<String> paymentMethod, AuthenticatedUser authenticatedUser, double amount, PatientShareResponse patientShareResponse, AppoitmentAllHistoryResultList appo) {
@ -959,8 +960,8 @@ class _ToDoState extends State<ToDo> with SingleTickerProviderStateMixin {
if (value != null) {
final appType = appo.isLiveCareAppointment ? 'livecare' : 'regular';
projectViewModel.analytics.appointment.payment_method(appointment_type: appType, clinic: appo.clinicName, payment_method: value[0], payment_type: 'appointment');
openPayment(value, projectViewModel.user, double.parse(patientShareResponse.patientShareWithTax.toString()), patientShareResponse, appo);
projectViewModel.analytics.appointment.payment_method(appointment_type: appType, clinic: appo.clinicName, payment_method: value[0], payment_type: 'appointment');
}
});
}
@ -971,13 +972,13 @@ class _ToDoState extends State<ToDo> with SingleTickerProviderStateMixin {
service.confirmAppointment(appo.appointmentNo, appo.clinicID, appo.projectID, appo.isLiveCareAppointment, context).then((res) {
GifLoaderDialogUtils.hideDialog(context);
if (res['MessageStatus'] == 1) {
projectViewModel.analytics.todoList.to_do_list_confirm_appointment(appo);
AppToast.showSuccessToast(message: res['ErrorEndUserMessage']);
if (appo.isLiveCareAppointment) {
insertLiveCareVIDARequest(appo);
} else {
getPatientAppointmentHistory();
}
projectViewModel.analytics.todoList.to_do_list_confirm_appointment(appo);
} else {
AppToast.showErrorToast(message: res['ErrorEndUserMessage']);
}

@ -242,8 +242,8 @@ class _HomePageFragment2State extends State<HomePageFragment2> {
),
FlatButton(
onPressed: () {
projectViewModel.analytics.hmgServices.viewAll();
Navigator.push(context, FadePage(page: AllHabibMedicalSevicePage2()));
projectViewModel.analytics.hmgServices.viewAll();
},
child: Text(
TranslationBase.of(context).viewAllServices,
@ -289,10 +289,10 @@ class _HomePageFragment2State extends State<HomePageFragment2> {
flex: 1,
child: InkWell(
onTap: () {
projectViewModel.analytics.offerPackages.log();
AuthenticatedUser user = projectViewModel.user;
if(projectViewModel.havePrivilege(82) || bypassPrivilageCheck)
Navigator.of(context).push(MaterialPageRoute(builder: (context) => PackagesOfferTabPage(user)));
projectViewModel.analytics.offerPackages.log();
},
child: Stack(
children: [

@ -170,7 +170,6 @@ class _LandingPageState extends State<LandingPage> with WidgetsBindingObserver {
}
changeCurrentTab(int tab) {
projectViewModel.analytics.bottomTabNavigation.log(tabIndex: tab, isLoggedIn: projectViewModel.isLogin);
if (!projectViewModel.isLogin) {
if (tab == 3) {
List<ImagesInfo> imagesInfo = [];
@ -246,6 +245,8 @@ class _LandingPageState extends State<LandingPage> with WidgetsBindingObserver {
// currentTab = tab;
}
});
projectViewModel.analytics.bottomTabNavigation.log(tabIndex: tab, isLoggedIn: projectViewModel.isLogin);
}
getToDoCount() {
@ -653,8 +654,8 @@ class _LandingPageState extends State<LandingPage> with WidgetsBindingObserver {
? FloatingButton(
elevation: true,
onTap: () {
projectViewModel.analytics.appointment.book_appointment();
changeCurrentTab(2);
projectViewModel.analytics.appointment.book_appointment();
},
)
: null);
@ -685,7 +686,6 @@ class _LandingPageState extends State<LandingPage> with WidgetsBindingObserver {
authService.selectDeviceImei(token).then((SelectDeviceIMEIRES value) => setUserValues(value));
if (authenticatedUserObject.isLogin) {
var data = AuthenticatedUser.fromJson(await sharedPref.getObject(USER_PROFILE));
projectViewModel.analytics.setUser(data);
if (data != null) {
authService.registeredAuthenticatedUser(data, token, 0, 0).then((res) => {});
authService.getDashboard().then((value) => {
@ -699,6 +699,7 @@ class _LandingPageState extends State<LandingPage> with WidgetsBindingObserver {
}),
});
}
projectViewModel.analytics.setUser(data);
} else {
projectViewModel.analytics.setUser(null);
}

@ -60,102 +60,102 @@ class ServicesView extends StatelessWidget {
LiveCareHome.isLiveCareTypeSelected = false;
});
} else if (index == 1) {
locator<GAnalytics>().hmgServices.logServiceName('covid-test drive-thru');
showCovidDialog(context);
locator<GAnalytics>().hmgServices.logServiceName('covid-test drive-thru');
} else if (index == 2) {
locator<GAnalytics>().hmgServices.logServiceName('online payments');
Navigator.push(context, FadePage(page: PaymentService()));
locator<GAnalytics>().hmgServices.logServiceName('online payments');
} else if (index == 3) {
locator<GAnalytics>().hmgServices.logServiceName('home health care');
Navigator.push(context, FadePage(page: HomeHealthCarePage()));
locator<GAnalytics>().hmgServices.logServiceName('home health care');
} else if (index == 4) {
locator<GAnalytics>().hmgServices.logServiceName('comprehensive medical checkup');
Navigator.push(context, FadePage(page: CMCPage()));
locator<GAnalytics>().hmgServices.logServiceName('comprehensive medical checkup');
} else if (index == 5) {
locator<GAnalytics>().hmgServices.logServiceName('emergency service');
Navigator.push(context, FadePage(page: ErOptions(isAppbar: true)));
locator<GAnalytics>().hmgServices.logServiceName('emergency service');
} else if (index == 6) {
locator<GAnalytics>().hmgServices.logServiceName('e-referral service');
Navigator.push(context, FadePage(page: EReferralPage()));
locator<GAnalytics>().hmgServices.logServiceName('e-referral service');
} else if (index == 7) {
locator<GAnalytics>().hmgServices.logServiceName('water consumption');
Navigator.push(context, FadePage(page: H2OPage()));
locator<GAnalytics>().hmgServices.logServiceName('water consumption');
} else if (index == 8) {
locator<GAnalytics>().hmgServices.logServiceName('find us reach us');
Navigator.push(context, FadePage(page: ContactUsPage()));
locator<GAnalytics>().hmgServices.logServiceName('find us reach us');
} else if (index == 9) {
locator<GAnalytics>().hmgServices.logServiceName('my medical details');
Navigator.push(
context,
FadePage(
page: MedicalProfilePageNew(),
),
);
locator<GAnalytics>().hmgServices.logServiceName('my medical details');
} else if (index == 10) {
locator<GAnalytics>().hmgServices.logServiceName('book appointment');
Navigator.push(
context,
FadePage(
page: Search(),
),
);
locator<GAnalytics>().hmgServices.logServiceName('book appointment');
} else if (index == 11) {
locator<GAnalytics>().hmgServices.logServiceName('al habib pharmacy');
getPharmacyToken(context);
locator<GAnalytics>().hmgServices.logServiceName('al habib pharmacy');
} else if (index == 12) {
locator<GAnalytics>().hmgServices.logServiceName('update insurance');
Navigator.push(
context,
FadePage(
page: InsuranceUpdate(),
),
);
locator<GAnalytics>().hmgServices.logServiceName('update insurance');
} else if (index == 13) {
locator<GAnalytics>().hmgServices.logServiceName('my family files');
Navigator.push(
context,
FadePage(
page: MyFamily(),
),
);
locator<GAnalytics>().hmgServices.logServiceName('my family files');
} else if (index == 14) {
locator<GAnalytics>().hmgServices.logServiceName('my child vaccines');
Navigator.push(
context,
FadePage(page: ChildInitialPage()),
);
locator<GAnalytics>().hmgServices.logServiceName('my child vaccines');
} else if (index == 15) {
// Navigator.pop(context);
locator<GAnalytics>().hmgServices.logServiceName('todo list');
LandingPage.shared.switchToDoFromHMGServices();
locator<GAnalytics>().hmgServices.logServiceName('todo list');
} else if (index == 16) {
locator<GAnalytics>().hmgServices.logServiceName('blood donation');
Navigator.push(
context,
FadePage(page: BloodDonationPage()),
);
locator<GAnalytics>().hmgServices.logServiceName('blood donation');
} else if (index == 17) {
locator<GAnalytics>().hmgServices.logServiceName('health calculator');
Navigator.push(
context,
FadePage(
page: (HealthCalculators()),
),
);
locator<GAnalytics>().hmgServices.logServiceName('health calculator');
} else if (index == 18) {
locator<GAnalytics>().hmgServices.logServiceName('heath converters');
Navigator.push(
context,
FadePage(
page: HealthConverter(),
),
);
locator<GAnalytics>().hmgServices.logServiceName('heath converters');
} else if (index == 19) {
locator<GAnalytics>().hmgServices.logServiceName('smart watches');
Navigator.push(
context,
FadePage(page: SmartWatchInstructions()),
);
locator<GAnalytics>().hmgServices.logServiceName('smart watches');
} else if (index == 20) {
locator<GAnalytics>().hmgServices.logServiceName('car parcking service');
Navigator.push(
@ -165,10 +165,9 @@ class ServicesView extends StatelessWidget {
),
);
} else if (index == 21) {
locator<GAnalytics>().hmgServices.logServiceName('virtual tour');
launch("https://hmgwebservices.com/vt_mobile/html/index.html");
locator<GAnalytics>().hmgServices.logServiceName('virtual tour');
} else if (index == 22) {
locator<GAnalytics>().hmgServices.logServiceName('latest news');
Navigator.of(context).push(
MaterialPageRoute(
builder: (BuildContext context) => MyWebView(
@ -177,6 +176,7 @@ class ServicesView extends StatelessWidget {
),
),
);
locator<GAnalytics>().hmgServices.logServiceName('latest news');
}
},
child: Container(

@ -294,8 +294,8 @@ class _LiveCarePatmentPageState extends State<LiveCarePatmentPage> {
return false;
});
} else {
projectViewModel.analytics.liveCare.livecare_immediate_consultation_TnC(clinic: widget.clinicName);
Navigator.pop(context, true);
projectViewModel.analytics.liveCare.livecare_immediate_consultation_TnC(clinic: widget.clinicName);
}
} else {
openPermissionsDialog();

@ -114,11 +114,11 @@ class _LiveCareTypeSelectState extends State<LiveCareTypeSelect> {
return InkWell(
onTap: () {
if (_loginIndex == 1) {
projectViewModel.analytics.liveCare.livecare_immediate_consultation();
Navigator.pop(context, "immediate");
projectViewModel.analytics.liveCare.livecare_immediate_consultation();
} else {
projectViewModel.analytics.liveCare.livecare_schedule_video_call();
Navigator.pop(context, "schedule");
projectViewModel.analytics.liveCare.livecare_schedule_video_call();
}
},
child: Container(

@ -164,8 +164,6 @@ class _State extends State<ClinicCard> {
getClinicTimings(PatientERGetClinicsList patientERGetClinicsList) {
locator<GAnalytics>().liveCare.livecare_clinic_schedule(clinic: patientERGetClinicsList.serviceName);
LiveCareService service = new LiveCareService();
GifLoaderDialogUtils.showMyDialog(context);
service.getLivecareClinicTiming(patientERGetClinicsList.serviceID, context).then((res) {
@ -207,5 +205,7 @@ class _State extends State<ClinicCard> {
GifLoaderDialogUtils.hideDialog(context);
print(err);
});
locator<GAnalytics>().liveCare.livecare_clinic_schedule(clinic: patientERGetClinicsList.serviceName);
}
}

@ -106,7 +106,6 @@ class _clinic_listState extends State<ClinicList> {
}
void startLiveCare() {
projectViewModel.analytics.liveCare.livecare_immediate_consultation_clinic(clinic: selectedClinicName);
bool isError = false;
LiveCareService service = new LiveCareService();
@ -128,6 +127,7 @@ class _clinic_listState extends State<ClinicList> {
isError = true;
AppToast.showErrorToast(message: err);
});
projectViewModel.analytics.liveCare.livecare_immediate_consultation_clinic(clinic: selectedClinicName);
}
showLiveCareCancelDialog(String msg, res) {
@ -290,8 +290,8 @@ class _clinic_listState extends State<ClinicList> {
}))).then((value) {
print(value);
if (value != null) {
projectViewModel.analytics.liveCare.payment_method(appointment_type: 'livecare', clinic: selectedClinicName, payment_method: value[0], payment_type: 'appointment');
openPayment(value, authUser, double.parse(getERAppointmentFeesList.total), appo);
projectViewModel.analytics.liveCare.payment_method(appointment_type: 'livecare', clinic: selectedClinicName, payment_method: value[0], payment_type: 'appointment');
}
});
}
@ -603,7 +603,6 @@ class _clinic_listState extends State<ClinicList> {
}
void startScheduleLiveCare() {
projectViewModel.analytics.liveCare.livecare_schedule_video_call_clinic(clinic: selectedClinicName);
List<DoctorList> doctorsList = [];
LiveCareService service = new LiveCareService();
@ -642,6 +641,7 @@ class _clinic_listState extends State<ClinicList> {
AppToast.showErrorToast(message: err);
print(err);
});
projectViewModel.analytics.liveCare.livecare_schedule_video_call_clinic(clinic: selectedClinicName);
}
Future navigateToSearchResults(context, List<DoctorList> docList, List<PatientDoctorAppointmentList> patientDoctorAppointmentListHospital) async {

@ -275,8 +275,8 @@ class _ConfirmLogin extends State<ConfirmLogin> {
DefaultButton(
TranslationBase.of(context).useAnotherAccount,
() {
projectViewModel.analytics.loginRegistration.login_with_other_account();
Navigator.of(context).pushNamed(LOGIN_TYPE);
projectViewModel.analytics.loginRegistration.login_with_other_account();
},
),
],
@ -614,7 +614,6 @@ class _ConfirmLogin extends State<ConfirmLogin> {
}
else
{
projectViewModel.analytics.loginRegistration.login_successful(),
sharedPref.remove(FAMILY_FILE),
result.list.isFamily = false,
userData = result.list,
@ -627,6 +626,7 @@ class _ConfirmLogin extends State<ConfirmLogin> {
sharedPref.setObject(LOGIN_TOKEN_ID, result.logInTokenID),
sharedPref.setString(TOKEN, result.authenticationTokenID),
checkIfUserAgreedBefore(result),
projectViewModel.analytics.loginRegistration.login_successful(),
}
}
else

@ -74,8 +74,8 @@ class _ForgotPassword extends State<ForgotPassword> {
width: double.infinity,
child: FlatButton(
onPressed: () {
locator<GAnalytics>().loginRegistration.recover_file_number();
sendPatientIDBySMS();
locator<GAnalytics>().loginRegistration.recover_file_number();
},
child: Text(
TranslationBase.of(context).submit,

@ -64,8 +64,8 @@ class LoginType extends StatelessWidget {
text: TranslationBase.of(context).forgotPassword,
style: TextStyle(decoration: TextDecoration.underline, fontSize: 12, fontWeight: FontWeight.w600, color: Color(0xffC9272B), letterSpacing: -0.48, height: 18 / 12),
recognizer: TapGestureRecognizer()..onTap = () {
locator<GAnalytics>().loginRegistration.forget_file_number();
Navigator.of(context).push(FadePage(page: ForgotPassword()));
locator<GAnalytics>().loginRegistration.forget_file_number();
},
),
),
@ -77,8 +77,8 @@ class LoginType extends StatelessWidget {
width: double.infinity,
child: FlatButton(
onPressed: () {
locator<GAnalytics>().loginRegistration.register_now();
Navigator.of(context).push(FadePage(page: RegisterNew()));
locator<GAnalytics>().loginRegistration.register_now();
},
child: Text(
TranslationBase.of(context).registerNow,
@ -241,9 +241,9 @@ class LoginType extends StatelessWidget {
return InkWell(
onTap: () {
LoginType.loginType = _flag;
locator<GAnalytics>().loginRegistration.login_start(method: type);
LoginRegistration.loginMethod = _flag;
Navigator.of(_context).push(FadePage(page: Login()));
locator<GAnalytics>().loginRegistration.login_start(method: type);
},
child: Container(
padding: EdgeInsets.only(left: 20, right: 20, bottom: 15, top: 28),

@ -167,8 +167,8 @@ class _Register extends State<Register> {
child: Padding(
padding: EdgeInsets.all(10),
child: DefaultButton(TranslationBase.of(context).next, (){
locator<GAnalytics>().loginRegistration.registration_enter_details();
startRegistration();
locator<GAnalytics>().loginRegistration.registration_enter_details();
}, textColor: Colors.white, color: isButtonDisabled == true ? Colors.grey : Color(0xff359846))),
),
],

@ -81,8 +81,8 @@ class _WelcomeLogin extends State<WelcomeLogin> {
child: DefaultButton(
TranslationBase.of(context).no,
() => {
locator<GAnalytics>().loginRegistration.visited_alhabib_group(false),
Navigator.of(context).push(FadePage(page: RegisterNew())),
locator<GAnalytics>().loginRegistration.visited_alhabib_group(false),
},
color: CustomColors.accentColor,
textColor: Colors.white,
@ -93,8 +93,8 @@ class _WelcomeLogin extends State<WelcomeLogin> {
child: DefaultButton(
TranslationBase.of(context).yes,
() => {
locator<GAnalytics>().loginRegistration.visited_alhabib_group(true),
Navigator.of(context).push(FadePage(page: LoginType())),
locator<GAnalytics>().loginRegistration.visited_alhabib_group(true),
},
color: CustomColors.green,
),

@ -316,7 +316,6 @@ class _AdvancePaymentPageState extends State<AdvancePaymentPage> {
GifLoaderDialogUtils.showMyDialog(context);
projectViewModel.analytics.advancePayments.wallet_payment_details();
model.getPatientInfoByPatientIDAndMobileNumber(advanceModel).then((value) {
GifLoaderDialogUtils.hideDialog(context);
if (model.state != ViewState.Error && model.state != ViewState.ErrorLocal) {
@ -332,8 +331,6 @@ class _AdvancePaymentPageState extends State<AdvancePaymentPage> {
),
).then(
(value) {
projectViewModel.analytics.advancePayments.payment_method(method: value[0].toString().toLowerCase(), type: 'wallet');
Navigator.push(
context,
FadePage(
@ -346,10 +343,12 @@ class _AdvancePaymentPageState extends State<AdvancePaymentPage> {
),
),
);
projectViewModel.analytics.advancePayments.payment_method(method: value[0].toString().toLowerCase(), type: 'wallet');
},
);
}
});
projectViewModel.analytics.advancePayments.wallet_payment_details();
},
color: Color(0xffD02127),
textColor: Colors.white,

@ -209,7 +209,6 @@ class _ConfirmPaymentPageState extends State<ConfirmPaymentPage> {
child: DefaultButton(
TranslationBase.of(context).confirm.toUpperCase(),
() {
projectViewModel.analytics.advancePayments.payment_confirm(method: widget.selectedPaymentMethod.toLowerCase(), type: 'wallet');
if (widget.advanceModel.fileNumber == projectViewModel.user.patientID.toString()) {
openPayment(widget.selectedPaymentMethod, widget.authenticatedUser, double.parse(widget.advanceModel.amount), null);
@ -220,6 +219,7 @@ class _ConfirmPaymentPageState extends State<ConfirmPaymentPage> {
if (model.state != ViewState.ErrorLocal && model.state != ViewState.Error) showSMSDialog(model);
});
}
projectViewModel.analytics.advancePayments.payment_confirm(method: widget.selectedPaymentMethod.toLowerCase(), type: 'wallet');
// startApplePay();
// if()

@ -178,8 +178,8 @@ class MyBalancePage extends StatelessWidget {
DefaultButton(
TranslationBase.of(context).createAdvancedPayment,
() {
projectViewModel.analytics.advancePayments.wallet_recharge(service_type: 'alhabib wallet');
Navigator.push(context, FadePage(page: AdvancePaymentPage()));
projectViewModel.analytics.advancePayments.wallet_recharge(service_type: 'alhabib wallet');
},
).insideContainer,
],

@ -59,8 +59,8 @@ class PaymentService extends StatelessWidget {
medical.add(
InkWell(
onTap: () {
projectViewModel.analytics.advancePayments.payment_services(service_type: 'payment service');
Navigator.push(context, FadePage(page: AdvancePaymentPage()));
projectViewModel.analytics.advancePayments.payment_services(service_type: 'payment service');
},
child: MedicalProfileItem(
title: TranslationBase.of(context).payment,
@ -76,8 +76,8 @@ class PaymentService extends StatelessWidget {
medical.add(
InkWell(
onTap: () {
projectViewModel.analytics.advancePayments.payment_services(service_type: 'online check-in appointment');
navigateToToDoPage(context);
projectViewModel.analytics.advancePayments.payment_services(service_type: 'online check-in appointment');
},
child: MedicalProfileItem(
title: TranslationBase.of(context).onlineCheckIn,
@ -93,8 +93,8 @@ class PaymentService extends StatelessWidget {
medical.add(
InkWell(
onTap: () {
projectViewModel.analytics.advancePayments.payment_services(service_type: 'alhabib wallet');
Navigator.push(context, FadePage(page: MyBalancePage()));
projectViewModel.analytics.advancePayments.payment_services(service_type: 'alhabib wallet');
},
child: MedicalProfileItem(
title: TranslationBase.of(context).hmg,

@ -404,8 +404,8 @@ class _AppDrawerState extends State<AppDrawer> {
InkWell(
child: DrawerItem(TranslationBase.of(context).rateApp, Icons.star, bottomLine: false, letterSpacing: -0.84, fontSize: 14, projectProvider: projectProvider),
onTap: () {
locator<GAnalytics>().hamburgerMenu.logMenuItemClick('rate our app');
openAppReviewDialog();
locator<GAnalytics>().hamburgerMenu.logMenuItemClick('rate our app');
// if (Platform.isIOS) {
// launch("https://apps.apple.com/sa/app/dr-suliaman-alhabib/id733503978");
// } else {
@ -453,9 +453,9 @@ class _AppDrawerState extends State<AppDrawer> {
InkWell(
onTap: () {
Navigator.push(context, FadePage(page: CallPage()));
locator<GAnalytics>().hamburgerMenu.logMenuItemClick('cloud solution logo tap');
GifLoaderDialogUtils.showMyDialog(context);
HMGNetworkConnectivity(context).start();
locator<GAnalytics>().hamburgerMenu.logMenuItemClick('cloud solution logo tap');
},
child: Row(
crossAxisAlignment: CrossAxisAlignment.center,
@ -551,11 +551,9 @@ class _AppDrawerState extends State<AppDrawer> {
}
login() async {
locator<GAnalytics>().hamburgerMenu.logMenuItemClick('login');
var data = await sharedPref.getObject(IMEI_USER_DATA);
sharedPref.remove(REGISTER_DATA_FOR_LOGIIN);
locator<GAnalytics>().loginRegistration.login_register_initiate();
if (data != null) {
Navigator.of(context).pushNamed(CONFIRM_LOGIN);
} else {
@ -577,6 +575,8 @@ class _AppDrawerState extends State<AppDrawer> {
);
});
}
locator<GAnalytics>().loginRegistration.login_register_initiate();
locator<GAnalytics>().hamburgerMenu.logMenuItemClick('login');
}
Future<GetAllSharedRecordsByStatusResponse> getFamilyFiles() async {

Loading…
Cancel
Save