models updates -> 3.13.6

merge-update-with-lab-changes
devamirsaleemahmad 3 years ago
parent 9c2948db29
commit b26f535749

@ -1,22 +1,22 @@
class DoctorList { class DoctorList {
num? clinicID; int? clinicID;
dynamic appointmentNo; dynamic appointmentNo;
String? clinicName; String? clinicName;
String? doctorTitle; String? doctorTitle;
num? iD; num? iD;
String? name; String? name;
num? projectID; int? projectID;
String? projectName; String? projectName;
num? actualDoctorRate; num? actualDoctorRate;
num? clinicRoomNo; num? clinicRoomNo;
dynamic date; dynamic date;
dynamic appointmentDate; dynamic appointmentDate;
dynamic dayName; dynamic dayName;
num? doctorID; int? doctorID;
String? doctorImageURL; String? doctorImageURL;
dynamic doctorProfile; dynamic doctorProfile;
dynamic doctorProfileInfo; dynamic doctorProfileInfo;
num? doctorRate; int? doctorRate;
num? gender; num? gender;
String? genderDescription; String? genderDescription;
bool? isAppointmentAllowed; bool? isAppointmentAllowed;
@ -31,7 +31,7 @@ class DoctorList {
String? nationalityID; String? nationalityID;
String? nationalityName; String? nationalityName;
dynamic nearestFreeSlot; dynamic nearestFreeSlot;
num? noOfPatientsRate; int? noOfPatientsRate;
num? originalClinicID; num? originalClinicID;
num? personRate; num? personRate;
dynamic projectDistanceInKiloMeters; dynamic projectDistanceInKiloMeters;

@ -5,12 +5,12 @@ class HeaderModel {
List<String> speciality; List<String> speciality;
String invoiceNo; String invoiceNo;
String projectName; String projectName;
DateTime date; DateTime? date;
String time; String? time;
String nationalityFlagURL; String nationalityFlagURL;
int doctorRate; int? doctorRate;
int actualDoctorRate; int? actualDoctorRate;
int totalReviews; int? totalReviews;
String decimalDoctorRate; String decimalDoctorRate;
String email; String email;

@ -18,7 +18,7 @@ class DoctorList extends StatelessWidget {
return BaseView<BariatricsViewModel>( return BaseView<BariatricsViewModel>(
allowAny: true, allowAny: true,
onModelReady: (model) => model.getDoctorList(disease: diseaseByClinic), onModelReady: (model) => model.getDoctorList(disease: diseaseByClinic),
builder: (BuildContext context, BariatricsViewModel model, Widget child) => AppScaffold( builder: (BuildContext context, BariatricsViewModel model, Widget? child) => AppScaffold(
isShowDecPage: false, isShowDecPage: false,
isShowAppBar: true, isShowAppBar: true,
baseViewModel: model, baseViewModel: model,

@ -42,10 +42,10 @@ class BookConfirm extends StatefulWidget {
bool isLiveCareAppointment; bool isLiveCareAppointment;
int initialSlotDuration; int initialSlotDuration;
BookConfirm({@required this.doctor, @required this.selectedDate, @required this.isLiveCareAppointment, @required this.selectedTime, @required this.initialSlotDuration}); BookConfirm({required this.doctor, required this.selectedDate, required this.isLiveCareAppointment, required this.selectedTime, required this.initialSlotDuration});
DoctorsListService service; late DoctorsListService service;
PatientShareResponse patientShareResponse; late PatientShareResponse patientShareResponse;
// AuthenticatedUser authUser; // AuthenticatedUser authUser;
@ -54,8 +54,8 @@ class BookConfirm extends StatefulWidget {
} }
class _BookConfirmState extends State<BookConfirm> { class _BookConfirmState extends State<BookConfirm> {
ProjectViewModel projectViewModel; late ProjectViewModel projectViewModel;
ToDoCountProviderModel toDoProvider; late ToDoCountProviderModel toDoProvider;
AppSharedPreferences sharedPref = new AppSharedPreferences(); AppSharedPreferences sharedPref = new AppSharedPreferences();
@ -77,7 +77,7 @@ class _BookConfirmState extends State<BookConfirm> {
toDoProvider = Provider.of<ToDoCountProviderModel>(context); toDoProvider = Provider.of<ToDoCountProviderModel>(context);
projectViewModel = Provider.of(context); projectViewModel = Provider.of(context);
return AppScaffold( return AppScaffold(
appBarTitle: widget.doctor.doctorTitle + " " + widget.doctor.name, appBarTitle: widget.doctor.doctorTitle! + " " + widget.doctor.name!,
isShowDecPage: false, isShowDecPage: false,
isShowAppBar: true, isShowAppBar: true,
showNewAppBarTitle: true, showNewAppBarTitle: true,
@ -90,15 +90,15 @@ class _BookConfirmState extends State<BookConfirm> {
children: <Widget>[ children: <Widget>[
DoctorHeader( DoctorHeader(
headerModel: HeaderModel( headerModel: HeaderModel(
widget.doctor.name, widget.doctor.name!,
widget.doctor.doctorID, widget.doctor.doctorID!,
widget.doctor.doctorImageURL, widget.doctor.doctorImageURL!,
widget.doctor.speciality, widget.doctor.speciality!,
"", "",
widget.doctor.projectName, widget.doctor.projectName!,
null, null,
null, null,
widget.doctor.nationalityFlagURL, widget.doctor.nationalityFlagURL!,
widget.doctor.doctorRate, widget.doctor.doctorRate,
null, null,
widget.doctor.noOfPatientsRate, widget.doctor.noOfPatientsRate,
@ -143,8 +143,8 @@ class _BookConfirmState extends State<BookConfirm> {
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
mainAxisSize: MainAxisSize.max, mainAxisSize: MainAxisSize.max,
children: <Widget>[ children: <Widget>[
if (!widget.isLiveCareAppointment) showInfo(TranslationBase.of(context).hospital, widget.doctor.projectName), if (!widget.isLiveCareAppointment) showInfo(TranslationBase.of(context).hospital, widget.doctor.projectName!),
showInfo(TranslationBase.of(context).clinic, widget.doctor.clinicName), showInfo(TranslationBase.of(context).clinic, widget.doctor.clinicName!),
showInfo(TranslationBase.of(context).date, getDate()), showInfo(TranslationBase.of(context).date, getDate()),
showInfo(TranslationBase.of(context).time, widget.selectedTime) showInfo(TranslationBase.of(context).time, widget.selectedTime)
], ],
@ -176,9 +176,9 @@ class _BookConfirmState extends State<BookConfirm> {
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
mainAxisSize: MainAxisSize.max, mainAxisSize: MainAxisSize.max,
children: <Widget>[ children: <Widget>[
showInfo(TranslationBase.of(context).name, projectViewModel.user.firstName + " " + projectViewModel.user.lastName), showInfo(TranslationBase.of(context).name, projectViewModel.user!.firstName! + " " + projectViewModel.user!.lastName!),
showInfo(TranslationBase.of(context).gender, projectViewModel.user.genderDescription), showInfo(TranslationBase.of(context).gender, projectViewModel.user!.genderDescription!),
showInfo(TranslationBase.of(context).age, projectViewModel.user.age.toString()) showInfo(TranslationBase.of(context).age, projectViewModel.user!.age.toString())
], ],
), ),
], ],
@ -279,10 +279,10 @@ class _BookConfirmState extends State<BookConfirm> {
} }
checkPatientNphiesEligibility(DoctorList docObject, String appointmentNo, BuildContext context) { checkPatientNphiesEligibility(DoctorList docObject, String appointmentNo, BuildContext context) {
widget.service.checkPatientNphiesEligibility(docObject.projectID).then((res) { widget.service.checkPatientNphiesEligibility(docObject.projectID!).then((res) {
GifLoaderDialogUtils.hideDialog(context); GifLoaderDialogUtils.hideDialog(context);
if (res["isNphiesMatchedWithVida"]) { if (res["isNphiesMatchedWithVida"]) {
getPatientShare(context, appointmentNo, docObject.clinicID, docObject.projectID, docObject); getPatientShare(context, appointmentNo, docObject.clinicID!, docObject.projectID!, docObject);
getToDoCount(); getToDoCount();
} else { } else {
ConfirmDialog dialog = new ConfirmDialog( ConfirmDialog dialog = new ConfirmDialog(
@ -308,10 +308,10 @@ class _BookConfirmState extends State<BookConfirm> {
void continueAsCash(DoctorList docObject, String appointmentNo) { void continueAsCash(DoctorList docObject, String appointmentNo) {
GifLoaderDialogUtils.showMyDialog(context); GifLoaderDialogUtils.showMyDialog(context);
widget.service.convertPatientToCash(docObject.projectID).then((res) { widget.service.convertPatientToCash(docObject.projectID!).then((res) {
GifLoaderDialogUtils.hideDialog(context); GifLoaderDialogUtils.hideDialog(context);
if (res["MessageStatus"] == 1) { if (res["MessageStatus"] == 1) {
getPatientShare(context, appointmentNo, docObject.clinicID, docObject.projectID, docObject); getPatientShare(context, appointmentNo, docObject.clinicID!, docObject.projectID!, docObject);
getToDoCount(); getToDoCount();
} else { } else {
AppToast.showErrorToast(message: res["ErrorEndUserMessage"]); AppToast.showErrorToast(message: res["ErrorEndUserMessage"]);
@ -329,7 +329,7 @@ class _BookConfirmState extends State<BookConfirm> {
GifLoaderDialogUtils.showMyDialog(context); GifLoaderDialogUtils.showMyDialog(context);
AppoitmentAllHistoryResultList appo; AppoitmentAllHistoryResultList appo;
widget.service widget.service
.insertAppointment(docObject.doctorID, docObject.clinicID, docObject.projectID, widget.selectedTime, widget.selectedDate, initialSlotDuration, context, null, null, null, projectViewModel) .insertAppointment(docObject.doctorID!, docObject.clinicID!, docObject.projectID!, widget.selectedTime, widget.selectedDate, initialSlotDuration, context, 'null', null, null, projectViewModel)
.then((res) { .then((res) {
if (res['MessageStatus'] == 1) { if (res['MessageStatus'] == 1) {
AppToast.showSuccessToast(message: TranslationBase.of(context).bookedSuccess); AppToast.showSuccessToast(message: TranslationBase.of(context).bookedSuccess);
@ -337,17 +337,17 @@ class _BookConfirmState extends State<BookConfirm> {
Future.delayed(new Duration(milliseconds: 500), () { Future.delayed(new Duration(milliseconds: 500), () {
// checkPatientNphiesEligibility(docObject, res['AppointmentNo'], context); // checkPatientNphiesEligibility(docObject, res['AppointmentNo'], context);
getToDoCount(); getToDoCount();
getPatientShare(context, res['AppointmentNo'], docObject.clinicID, docObject.projectID, docObject); getPatientShare(context, res['AppointmentNo'], docObject.clinicID!, docObject.projectID!, docObject);
}); });
widget.service.logDoctorFreeSlots(docObject.doctorID, docObject.clinicID, docObject.projectID, decodedLogs, res['AppointmentNo'], context).then((res) { widget.service.logDoctorFreeSlots(docObject.doctorID!, docObject.clinicID!, docObject.projectID!, decodedLogs, res['AppointmentNo'], context).then((res) {
if (res['MessageStatus'] == 1) { if (res['MessageStatus'] == 1) {
print("Logs Saved"); print("Logs Saved");
} else { } else {
print("Error Saving logs"); print("Error Saving logs");
} }
}); });
projectViewModel.analytics.appointment.book_appointment_confirmation_success(appointment_type: 'regular', dateTime: timeSlot, doctor: widget.doctor); projectViewModel.analytics.appointment.book_appointment_confirmation_success(appointment_type: 'regular', dateTime: timeSlot!, doctor: widget.doctor);
} else { } else {
GifLoaderDialogUtils.hideDialog(context); GifLoaderDialogUtils.hideDialog(context);
appo = new AppoitmentAllHistoryResultList(); appo = new AppoitmentAllHistoryResultList();
@ -376,22 +376,22 @@ class _BookConfirmState extends State<BookConfirm> {
AppToast.showErrorToast(message: err); AppToast.showErrorToast(message: err);
print(err); print(err);
}); });
projectViewModel.analytics.appointment.book_appointment_click_confirm(appointment_type: 'regular', dateTime: timeSlot, doctor: widget.doctor); projectViewModel.analytics.appointment.book_appointment_click_confirm(appointment_type: 'regular', dateTime: timeSlot!, doctor: widget.doctor);
} }
insertLiveCareScheduledAppointment(context, DoctorList docObject) { insertLiveCareScheduledAppointment(context, DoctorList docObject) {
final timeSlot = DocAvailableAppointments.selectedAppoDateTime; final timeSlot = DocAvailableAppointments.selectedAppoDateTime;
widget.selectedDate = timeSlot.toUtc().add(Duration(hours: 3)).toString().split(" ")[0]; widget.selectedDate = timeSlot!.toUtc().add(Duration(hours: 3)).toString().split(" ")[0];
widget.selectedTime = timeSlot.toUtc().add(Duration(hours: 3)).toString().split(" ")[1].substring(0, 5); widget.selectedTime = timeSlot!.toUtc().add(Duration(hours: 3)).toString().split(" ")[1].substring(0, 5);
GifLoaderDialogUtils.showMyDialog(context); GifLoaderDialogUtils.showMyDialog(context);
AppoitmentAllHistoryResultList appo; AppoitmentAllHistoryResultList appo;
widget.service.insertLiveCareScheduleAppointment(docObject.doctorID, docObject.clinicID, docObject.projectID, docObject.serviceID, widget.selectedTime, widget.selectedDate, context).then((res) { widget.service.insertLiveCareScheduleAppointment(docObject.doctorID!, docObject.clinicID!, docObject.projectID!, docObject.serviceID, widget.selectedTime, widget.selectedDate, context).then((res) {
if (res['MessageStatus'] == 1) { if (res['MessageStatus'] == 1) {
AppToast.showSuccessToast(message: TranslationBase.of(context).bookedSuccess); AppToast.showSuccessToast(message: TranslationBase.of(context).bookedSuccess);
print(res['AppointmentNo']); print(res['AppointmentNo']);
Future.delayed(new Duration(milliseconds: 500), () { Future.delayed(new Duration(milliseconds: 500), () {
getLiveCareAppointmentPatientShare(context, res['AppointmentNo'], docObject.clinicID, docObject.projectID, docObject); getLiveCareAppointmentPatientShare(context, res['AppointmentNo'], docObject.clinicID!, docObject.projectID!, docObject);
getToDoCount(); getToDoCount();
}); });
projectViewModel.analytics.appointment.book_appointment_confirmation_success(appointment_type: 'livecare', dateTime: timeSlot, doctor: widget.doctor); projectViewModel.analytics.appointment.book_appointment_confirmation_success(appointment_type: 'livecare', dateTime: timeSlot, doctor: widget.doctor);

@ -31,13 +31,13 @@ class BookSuccess extends StatefulWidget {
PatientShareResponse patientShareResponse; PatientShareResponse patientShareResponse;
DoctorList docObject; DoctorList docObject;
MyInAppBrowser browser; late MyInAppBrowser browser;
final ChromeSafariBrowser chromeBrowser = new MyChromeSafariBrowser(new MyInAppBrowser()); final ChromeSafariBrowser chromeBrowser = new MyChromeSafariBrowser(new MyInAppBrowser());
String appoDateFormatted; String appoDateFormatted;
String appoTimeFormatted; String appoTimeFormatted;
BookSuccess({@required this.patientShareResponse, @required this.docObject, @required this.appoDateFormatted, @required this.appoTimeFormatted}); BookSuccess({required this.patientShareResponse, required this.docObject, required this.appoDateFormatted, required this.appoTimeFormatted});
@override @override
_BookSuccessState createState() => _BookSuccessState(); _BookSuccessState createState() => _BookSuccessState();
@ -48,16 +48,16 @@ class _BookSuccessState extends State<BookSuccess> {
// AuthenticatedUser authUser; // AuthenticatedUser authUser;
ProjectViewModel projectViewModel; late ProjectViewModel projectViewModel;
String selectedPaymentMethod = ""; String selectedPaymentMethod = "";
String selectedInstallments = ""; String selectedInstallments = "";
String tamaraPaymentStatus; String? tamaraPaymentStatus;
String tamaraOrderID; String? tamaraOrderID;
@override @override
initState() { initState() {
WidgetsBinding.instance.addPostFrameCallback((_) async { WidgetsBinding.instance.addPostFrameCallback((_) async {
if (widget.patientShareResponse.isLiveCareAppointment && if (widget.patientShareResponse.isLiveCareAppointment! &&
(widget.patientShareResponse.patientShareWithTax.toString() == "0" || widget.patientShareResponse.patientShareWithTax.toString() == "0.0")) { (widget.patientShareResponse.patientShareWithTax.toString() == "0" || widget.patientShareResponse.patientShareWithTax.toString() == "0.0")) {
setOnlineCheckInForAppointment(); setOnlineCheckInForAppointment();
} }
@ -69,7 +69,7 @@ class _BookSuccessState extends State<BookSuccess> {
Widget build(BuildContext context) { Widget build(BuildContext context) {
projectViewModel = Provider.of<ProjectViewModel>(context); projectViewModel = Provider.of<ProjectViewModel>(context);
return AppScaffold( return AppScaffold(
appBarTitle: widget.docObject.doctorTitle + " " + widget.docObject.name, appBarTitle: widget.docObject.doctorTitle! + " " + widget.docObject.name!,
isShowDecPage: false, isShowDecPage: false,
isShowAppBar: true, isShowAppBar: true,
showNewAppBarTitle: true, showNewAppBarTitle: true,
@ -82,15 +82,15 @@ class _BookSuccessState extends State<BookSuccess> {
children: <Widget>[ children: <Widget>[
DoctorHeader( DoctorHeader(
headerModel: HeaderModel( headerModel: HeaderModel(
widget.docObject.name, widget.docObject.name!,
widget.docObject.doctorID, widget.docObject.doctorID!,
widget.docObject.doctorImageURL, widget.docObject.doctorImageURL!,
widget.docObject.speciality, widget.docObject.speciality!,
"", "",
widget.docObject.projectName, widget.docObject.projectName!,
null, null,
null, null,
widget.docObject.nationalityFlagURL, widget.docObject.nationalityFlagURL!,
widget.docObject.doctorRate, widget.docObject.doctorRate,
null, null,
widget.docObject.noOfPatientsRate, widget.docObject.noOfPatientsRate,
@ -119,7 +119,7 @@ class _BookSuccessState extends State<BookSuccess> {
], ],
), ),
), ),
getNextActionWidget(), getNextActionWidget()!,
], ],
), ),
), ),
@ -127,7 +127,7 @@ class _BookSuccessState extends State<BookSuccess> {
); );
} }
Widget getBottomContainer() { Widget? getBottomContainer() {
switch (widget.patientShareResponse.nextAction) { switch (widget.patientShareResponse.nextAction) {
case 0: case 0:
return Container(); return Container();
@ -266,7 +266,7 @@ class _BookSuccessState extends State<BookSuccess> {
appo.isLiveCareAppointment = widget.patientShareResponse.isLiveCareAppointment; appo.isLiveCareAppointment = widget.patientShareResponse.isLiveCareAppointment;
appo.doctorID = widget.patientShareResponse.doctorID; appo.doctorID = widget.patientShareResponse.doctorID;
appo.appointmentDate = widget.patientShareResponse.appointmentDate; appo.appointmentDate = widget.patientShareResponse.appointmentDate;
if (appo.isLiveCareAppointment) if (appo.isLiveCareAppointment!)
insertLiveCareVIDARequest(appo); insertLiveCareVIDARequest(appo);
else else
navigateToHome(context); navigateToHome(context);
@ -294,13 +294,13 @@ class _BookSuccessState extends State<BookSuccess> {
appo.serviceID = widget.patientShareResponse.serviceID; appo.serviceID = widget.patientShareResponse.serviceID;
appo.isLiveCareAppointment = widget.patientShareResponse.isLiveCareAppointment; appo.isLiveCareAppointment = widget.patientShareResponse.isLiveCareAppointment;
appo.doctorID = widget.patientShareResponse.doctorID; appo.doctorID = widget.patientShareResponse.doctorID;
if (appo.isLiveCareAppointment) { if (appo.isLiveCareAppointment!) {
navigateToHome(context); navigateToHome(context);
} else { } else {
confirmAppointment(appo); confirmAppointment(appo);
} }
}, },
child: Text(widget.patientShareResponse.isLiveCareAppointment ? TranslationBase.of(context).confirmLiveCare : TranslationBase.of(context).confirm, child: Text(widget.patientShareResponse.isLiveCareAppointment! ? TranslationBase.of(context).confirmLiveCare : TranslationBase.of(context).confirm,
style: TextStyle(fontSize: 16.0, color: Colors.white)), style: TextStyle(fontSize: 16.0, color: Colors.white)),
), ),
), ),
@ -311,7 +311,7 @@ class _BookSuccessState extends State<BookSuccess> {
); );
} }
Widget getNextActionWidget() { Widget? getNextActionWidget() {
switch (widget.patientShareResponse.nextAction) { switch (widget.patientShareResponse.nextAction) {
case 0: case 0:
return Container(); return Container();
@ -336,7 +336,7 @@ class _BookSuccessState extends State<BookSuccess> {
} }
} }
String getNextAction() { String? getNextAction() {
switch (widget.patientShareResponse.nextAction) { switch (widget.patientShareResponse.nextAction) {
case 0: case 0:
return 'No Action'; return 'No Action';
@ -426,7 +426,7 @@ class _BookSuccessState extends State<BookSuccess> {
setOnlineCheckInForAppointment() { setOnlineCheckInForAppointment() {
DoctorsListService service = new DoctorsListService(); DoctorsListService service = new DoctorsListService();
GifLoaderDialogUtils.showMyDialog(context); GifLoaderDialogUtils.showMyDialog(context);
service.setOnlineCheckInForAppointment(widget.patientShareResponse.appointmentNo.toString(), widget.patientShareResponse.projectID, context).then((res) { service.setOnlineCheckInForAppointment(widget.patientShareResponse.appointmentNo.toString(), widget.patientShareResponse.projectID!, context).then((res) {
AppoitmentAllHistoryResultList appo = new AppoitmentAllHistoryResultList(); AppoitmentAllHistoryResultList appo = new AppoitmentAllHistoryResultList();
appo.clinicID = widget.docObject.clinicID; appo.clinicID = widget.docObject.clinicID;
appo.projectID = widget.docObject.projectID; appo.projectID = widget.docObject.projectID;
@ -447,11 +447,11 @@ class _BookSuccessState extends State<BookSuccess> {
confirmAppointment(AppoitmentAllHistoryResultList appo) { confirmAppointment(AppoitmentAllHistoryResultList appo) {
DoctorsListService service = new DoctorsListService(); DoctorsListService service = new DoctorsListService();
GifLoaderDialogUtils.showMyDialog(context); GifLoaderDialogUtils.showMyDialog(context);
service.confirmAppointment(appo.appointmentNo, appo.clinicID, appo.projectID, appo.isLiveCareAppointment, context).then((res) { service.confirmAppointment(appo.appointmentNo!, appo.clinicID!, appo.projectID!, appo.isLiveCareAppointment!, context).then((res) {
GifLoaderDialogUtils.hideDialog(context); GifLoaderDialogUtils.hideDialog(context);
if (res['MessageStatus'] == 1) { if (res['MessageStatus'] == 1) {
AppToast.showSuccessToast(message: res['ErrorEndUserMessage']); AppToast.showSuccessToast(message: res['ErrorEndUserMessage']);
if (appo.isLiveCareAppointment) { if (appo.isLiveCareAppointment!) {
insertLiveCareVIDARequest(appo); insertLiveCareVIDARequest(appo);
} else { } else {
navigateToHome(context); navigateToHome(context);
@ -470,8 +470,8 @@ class _BookSuccessState extends State<BookSuccess> {
DoctorsListService service = new DoctorsListService(); DoctorsListService service = new DoctorsListService();
GifLoaderDialogUtils.showMyDialog(context); GifLoaderDialogUtils.showMyDialog(context);
service service
.insertVIDARequest(appo.appointmentNo, appo.clinicID, appo.projectID, appo.serviceID, appo.doctorID, appo.appointmentDate, .insertVIDARequest(appo.appointmentNo!, appo.clinicID!, appo.projectID!, appo.serviceID!, appo.doctorID!, appo.appointmentDate!,
Utils.getAppointmentTransID(appo.projectID, appo.clinicID, appo.appointmentNo), context) Utils.getAppointmentTransID(appo.projectID!, appo.clinicID!, appo.appointmentNo!), context)
.then((res) { .then((res) {
GifLoaderDialogUtils.hideDialog(context); GifLoaderDialogUtils.hideDialog(context);
if (res['MessageStatus'] == 1) { if (res['MessageStatus'] == 1) {
@ -550,13 +550,13 @@ class _BookSuccessState extends State<BookSuccess> {
context, context,
FadePage( FadePage(
page: PaymentMethod( page: PaymentMethod(
onSelectedMethod: (String metohd, [String selectedInstallmentPlan]) { onSelectedMethod: (String metohd, [String? selectedInstallmentPlan]) {
setState(() {}); setState(() {});
}, },
patientShare: widget.patientShareResponse.patientShareWithTax))) patientShare: widget.patientShareResponse.patientShareWithTax)))
.then((value) { .then((value) {
if (value != null) { if (value != null) {
openPayment(value, projectViewModel.user, double.parse(patientShareResponse.patientShareWithTax.toString()), patientShareResponse, appo); openPayment(value, projectViewModel.user!, 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'); projectViewModel.analytics.appointment.payment_method(appointment_type: 'regular', clinic: widget.docObject.clinicName, payment_method: value[0], payment_type: 'appointment');
} }
}); });
@ -569,18 +569,18 @@ class _BookSuccessState extends State<BookSuccess> {
widget.browser.openPaymentBrowser( widget.browser.openPaymentBrowser(
amount, amount,
"Appointment check in", "Appointment check in",
Utils.getAppointmentTransID(appo.projectID, appo.clinicID, appo.appointmentNo), Utils.getAppointmentTransID(appo.projectID!, appo.clinicID!, appo.appointmentNo!),
appo.projectID.toString(), appo.projectID.toString(),
authenticatedUser.emailAddress, authenticatedUser.emailAddress!,
paymentMethod[0], paymentMethod[0],
authenticatedUser.patientType, authenticatedUser.patientType,
authenticatedUser.firstName, authenticatedUser.firstName!,
authenticatedUser.patientID, authenticatedUser.patientID,
authenticatedUser, authenticatedUser,
widget.browser, widget.browser,
widget.patientShareResponse.isLiveCareAppointment, widget.patientShareResponse.isLiveCareAppointment!,
"2", "2",
widget.patientShareResponse.isLiveCareAppointment ? widget.patientShareResponse.clinicID.toString() : "", widget.patientShareResponse.isLiveCareAppointment! ? widget.patientShareResponse.clinicID.toString() : "",
context, context,
widget.patientShareResponse.appointmentDate, widget.patientShareResponse.appointmentDate,
widget.patientShareResponse.appointmentNo, widget.patientShareResponse.appointmentNo,
@ -623,7 +623,7 @@ class _BookSuccessState extends State<BookSuccess> {
onBrowserExit(AppoitmentAllHistoryResultList appo, bool isPaymentMade) { onBrowserExit(AppoitmentAllHistoryResultList appo, bool isPaymentMade) {
try { try {
if (selectedPaymentMethod == "TAMARA") { if (selectedPaymentMethod == "TAMARA") {
checkTamaraPaymentStatus(Utils.getAppointmentTransID(appo.projectID, appo.clinicID, appo.appointmentNo), appo); checkTamaraPaymentStatus(Utils.getAppointmentTransID(appo.projectID!, appo.clinicID!, appo.appointmentNo!), appo);
// if (tamaraPaymentStatus != null && tamaraPaymentStatus.toLowerCase() == "approved") { // if (tamaraPaymentStatus != null && tamaraPaymentStatus.toLowerCase() == "approved") {
// updateTamaraRequestStatus("success", "14", Utils.getAppointmentTransID(appo.projectID, appo.clinicID, appo.appointmentNo), tamaraOrderID, num.parse(selectedInstallments), appo); // updateTamaraRequestStatus("success", "14", Utils.getAppointmentTransID(appo.projectID, appo.clinicID, appo.appointmentNo), tamaraOrderID, num.parse(selectedInstallments), appo);
// } else { // } else {
@ -644,10 +644,10 @@ class _BookSuccessState extends State<BookSuccess> {
service.getTamaraPaymentStatus(orderID).then((res) { service.getTamaraPaymentStatus(orderID).then((res) {
GifLoaderDialogUtils.hideDialog(context); GifLoaderDialogUtils.hideDialog(context);
if (res["status"].toString().toLowerCase() == "success") { if (res["status"].toString().toLowerCase() == "success") {
updateTamaraRequestStatus("success", "14", orderID, tamaraOrderID, num.parse(selectedInstallments), appo); updateTamaraRequestStatus("success", "14", orderID, tamaraOrderID!, int.parse(selectedInstallments), appo);
} else { } else {
updateTamaraRequestStatus( updateTamaraRequestStatus(
"Failed", "00", Utils.getAppointmentTransID(appo.projectID, appo.clinicID, appo.appointmentNo), tamaraOrderID != null ? tamaraOrderID : "", num.parse(selectedInstallments), appo); "Failed", "00", Utils.getAppointmentTransID(appo.projectID!, appo.clinicID!, appo.appointmentNo!), tamaraOrderID != null ? tamaraOrderID! : "", int.parse(selectedInstallments), appo);
} }
}).catchError((err) { }).catchError((err) {
GifLoaderDialogUtils.hideDialog(context); GifLoaderDialogUtils.hideDialog(context);
@ -671,7 +671,7 @@ class _BookSuccessState extends State<BookSuccess> {
DoctorsListService service = new DoctorsListService(); DoctorsListService service = new DoctorsListService();
service.updateTamaraRequestStatus(responseMessage, status, clientRequestID, tamaraOrderID, selectedInstallments).then((res) { service.updateTamaraRequestStatus(responseMessage, status, clientRequestID, tamaraOrderID, selectedInstallments).then((res) {
GifLoaderDialogUtils.hideDialog(context); GifLoaderDialogUtils.hideDialog(context);
if (tamaraPaymentStatus.toLowerCase() == "approved") { if (tamaraPaymentStatus!.toLowerCase() == "approved") {
markAppointmentForTamara(appo); markAppointmentForTamara(appo);
addAdvancedNumberRequestTamara("Tamara-Advance-0000", tamaraOrderID, appo.appointmentNo.toString(), appo); addAdvancedNumberRequestTamara("Tamara-Advance-0000", tamaraOrderID, appo.appointmentNo.toString(), appo);
} }
@ -688,9 +688,9 @@ class _BookSuccessState extends State<BookSuccess> {
markAppointmentForTamara(AppoitmentAllHistoryResultList appo) { markAppointmentForTamara(AppoitmentAllHistoryResultList appo) {
GifLoaderDialogUtils.showMyDialog(context); GifLoaderDialogUtils.showMyDialog(context);
DoctorsListService service = new DoctorsListService(); DoctorsListService service = new DoctorsListService();
service.markAppointmentForTamara(appo.projectID, appo.appointmentNo.toString()).then((res) { service.markAppointmentForTamara(appo.projectID!, appo.appointmentNo.toString()).then((res) {
GifLoaderDialogUtils.hideDialog(context); GifLoaderDialogUtils.hideDialog(context);
if (appo.isLiveCareAppointment) if (appo.isLiveCareAppointment!)
insertLiveCareVIDARequest(appo); insertLiveCareVIDARequest(appo);
else else
getAppoQR(context); getAppoQR(context);
@ -704,9 +704,9 @@ class _BookSuccessState extends State<BookSuccess> {
autoGenerateInvoiceTamara(AppoitmentAllHistoryResultList appo) { autoGenerateInvoiceTamara(AppoitmentAllHistoryResultList appo) {
GifLoaderDialogUtils.showMyDialog(context); GifLoaderDialogUtils.showMyDialog(context);
DoctorsListService service = new DoctorsListService(); DoctorsListService service = new DoctorsListService();
service.autoGenerateInvoiceTamara(appo.projectID, appo.appointmentNo.toString(), projectViewModel.user.mobileNumber).then((res) { service.autoGenerateInvoiceTamara(appo.projectID!, appo.appointmentNo.toString(), projectViewModel.user!.mobileNumber!).then((res) {
GifLoaderDialogUtils.hideDialog(context); GifLoaderDialogUtils.hideDialog(context);
if (appo.isLiveCareAppointment) if (appo.isLiveCareAppointment!)
insertLiveCareVIDARequest(appo); insertLiveCareVIDARequest(appo);
else else
getAppoQR(context); getAppoQR(context);
@ -721,10 +721,10 @@ class _BookSuccessState extends State<BookSuccess> {
String txn_ref; String txn_ref;
num amount; num amount;
String payment_method; String payment_method;
final currency = projectViewModel.user.outSA == 0 ? "sar" : 'aed'; final currency = projectViewModel.user!.outSA == 0 ? "sar" : 'aed';
GifLoaderDialogUtils.showMyDialog(context); GifLoaderDialogUtils.showMyDialog(context);
DoctorsListService service = new DoctorsListService(); DoctorsListService service = new DoctorsListService();
service.checkPaymentStatus(Utils.getAppointmentTransID(appo.projectID, appo.clinicID, appo.appointmentNo), false, context).then((res) { service.checkPaymentStatus(Utils.getAppointmentTransID(appo.projectID!, appo.clinicID!, appo.appointmentNo!), false, context).then((res) {
String paymentInfo = res['Response_Message']; String paymentInfo = res['Response_Message'];
if (paymentInfo == 'Success') { if (paymentInfo == 'Success') {
txn_ref = res['Merchant_Reference']; txn_ref = res['Merchant_Reference'];
@ -755,7 +755,7 @@ class _BookSuccessState extends State<BookSuccess> {
getApplePayAPQ(AppoitmentAllHistoryResultList appo) { getApplePayAPQ(AppoitmentAllHistoryResultList appo) {
GifLoaderDialogUtils.showMyDialog(context); GifLoaderDialogUtils.showMyDialog(context);
DoctorsListService service = new DoctorsListService(); DoctorsListService service = new DoctorsListService();
service.checkPaymentStatus(Utils.getAppointmentTransID(appo.projectID, appo.clinicID, appo.appointmentNo), false, context).then((res) { service.checkPaymentStatus(Utils.getAppointmentTransID(appo.projectID!, appo.clinicID!, appo.appointmentNo!), false, context).then((res) {
GifLoaderDialogUtils.hideDialog(context); GifLoaderDialogUtils.hideDialog(context);
String paymentInfo = res['Response_Message']; String paymentInfo = res['Response_Message'];
@ -776,7 +776,7 @@ class _BookSuccessState extends State<BookSuccess> {
String paymentReference = res['Fort_id'].toString(); String paymentReference = res['Fort_id'].toString();
service.createAdvancePayment(appo, appo.projectID.toString(), res['Amount'], res['Fort_id'], res['PaymentMethod'], context).then((res) { service.createAdvancePayment(appo, appo.projectID.toString(), res['Amount'], res['Fort_id'], res['PaymentMethod'], context).then((res) {
addAdvancedNumberRequest( addAdvancedNumberRequest(
Utils.isVidaPlusProject(projectViewModel, appo.projectID) Utils.isVidaPlusProject(projectViewModel, appo.projectID!)
? res['OnlineCheckInAppointments'][0]['AdvanceNumber_VP'].toString() ? res['OnlineCheckInAppointments'][0]['AdvanceNumber_VP'].toString()
: res['OnlineCheckInAppointments'][0]['AdvanceNumber'].toString(), : res['OnlineCheckInAppointments'][0]['AdvanceNumber'].toString(),
paymentReference, paymentReference,
@ -792,7 +792,7 @@ class _BookSuccessState extends State<BookSuccess> {
addAdvancedNumberRequest(String advanceNumber, String paymentReference, String appointmentID, AppoitmentAllHistoryResultList appo) { addAdvancedNumberRequest(String advanceNumber, String paymentReference, String appointmentID, AppoitmentAllHistoryResultList appo) {
DoctorsListService service = new DoctorsListService(); DoctorsListService service = new DoctorsListService();
service.addAdvancedNumberRequest(advanceNumber, paymentReference, appointmentID, context).then((res) { service.addAdvancedNumberRequest(advanceNumber, paymentReference, appointmentID, context).then((res) {
if (appo.isLiveCareAppointment) { if (appo.isLiveCareAppointment!) {
insertLiveCareVIDARequest(appo); insertLiveCareVIDARequest(appo);
} else { } else {
getAppoQR(context); getAppoQR(context);
@ -960,7 +960,8 @@ class _BookSuccessState extends State<BookSuccess> {
appointment.doctorTitle = "Dr. "; appointment.doctorTitle = "Dr. ";
appointment.doctorNameObj = widget.patientShareResponse.doctorNameObj; appointment.doctorNameObj = widget.patientShareResponse.doctorNameObj;
appointment.doctorImageURL = widget.patientShareResponse.doctorImageURL; appointment.doctorImageURL = widget.patientShareResponse.doctorImageURL;
appointment.doctorSpeciality = widget.patientShareResponse.doctorSpeciality; appointment.doctorSpeciality = widget.patientShareResponse.doctorSpeciality as List<String>?;
// changed by Aamir List dynamic into list of Strings
appointment.projectName = widget.patientShareResponse.projectName; appointment.projectName = widget.patientShareResponse.projectName;
appointment.projectID = widget.patientShareResponse.projectID; appointment.projectID = widget.patientShareResponse.projectID;
appointment.appointmentDate = widget.patientShareResponse.appointmentDate; appointment.appointmentDate = widget.patientShareResponse.appointmentDate;

@ -15,7 +15,7 @@ class BookingOptions extends StatefulWidget {
} }
class _BookingOptionsState extends State<BookingOptions> { class _BookingOptionsState extends State<BookingOptions> {
LocationUtils locationUtils; late LocationUtils locationUtils;
@override @override
void initState() { void initState() {

@ -27,7 +27,7 @@ class DentalComplaints extends StatefulWidget {
Function onSelectedMethod; Function onSelectedMethod;
bool isDoctorNameSearch; bool isDoctorNameSearch;
DentalComplaints({@required this.searchInfo, this.onSelectedMethod, this.isDoctorNameSearch = false}); DentalComplaints({required this.searchInfo, required this.onSelectedMethod, this.isDoctorNameSearch = false});
@override @override
_DentalComplaintsState createState() => _DentalComplaintsState(); _DentalComplaintsState createState() => _DentalComplaintsState();
@ -43,10 +43,10 @@ class _DentalComplaintsState extends State<DentalComplaints> {
List<DoctorList> doctorsList = []; List<DoctorList> doctorsList = [];
DentalProceduresModel dentalProceduresModel; late DentalProceduresModel dentalProceduresModel;
List<PatientDoctorAppointmentList> patientDoctorAppointmentListHospital =[]; List<PatientDoctorAppointmentList> patientDoctorAppointmentListHospital = [];
ProjectViewModel projectViewModel; late ProjectViewModel projectViewModel;
@override @override
void initState() { void initState() {
@ -75,9 +75,11 @@ class _DentalComplaintsState extends State<DentalComplaints> {
languageID: languageID, languageID: languageID,
isDoctorNameSearch: widget.isDoctorNameSearch, isDoctorNameSearch: widget.isDoctorNameSearch,
onSelectedMethod: widget.onSelectedMethod, onSelectedMethod: widget.onSelectedMethod,
)..logAnalytics = (){ )..logAnalytics = () {
final info = widget.searchInfo; final info = widget.searchInfo;
locator<GAnalytics>().appointment.book_appointment_chief_complaints(appointment_type: 'regular', hospital: info.hospital, clinic: info.clinic, treatment: complaintsList[index]); locator<GAnalytics>()
.appointment
.book_appointment_chief_complaints(appointment_type: 'regular', hospital: info.hospital, clinic: info.clinic, treatment: complaintsList[index]);
}, },
); );
}, },
@ -108,11 +110,11 @@ class _DentalComplaintsState extends State<DentalComplaints> {
patientDoctorAppointmentListHospital.length, patientDoctorAppointmentListHospital.length,
(index) => AppExpandableNotifier( (index) => AppExpandableNotifier(
isExpand: true, isExpand: true,
title: patientDoctorAppointmentListHospital[index].filterName + " - " + patientDoctorAppointmentListHospital[index].distanceInKMs + " " + TranslationBase.of(context).km, title: patientDoctorAppointmentListHospital[index].filterName! + " - " + patientDoctorAppointmentListHospital[index].distanceInKMs! + " " + TranslationBase.of(context).km,
bodyWidget: Column( bodyWidget: Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
mainAxisAlignment: MainAxisAlignment.spaceBetween, mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: patientDoctorAppointmentListHospital[index].patientDoctorAppointmentList.map((doctor) { children: patientDoctorAppointmentListHospital[index].patientDoctorAppointmentList!.map((doctor) {
return DoctorView( return DoctorView(
doctor: doctor, doctor: doctor,
isLiveCareAppointment: false, isLiveCareAppointment: false,
@ -135,7 +137,7 @@ class _DentalComplaintsState extends State<DentalComplaints> {
checkIfHasDentalPlan() { checkIfHasDentalPlan() {
DoctorsListService service = new DoctorsListService(); DoctorsListService service = new DoctorsListService();
GifLoaderDialogUtils.showMyDialog(context); GifLoaderDialogUtils.showMyDialog(context);
service.checkIfHasDentalPlan(widget.searchInfo.ProjectID, context).then((res) { service.checkIfHasDentalPlan(widget.searchInfo.ProjectID!, context).then((res) {
GifLoaderDialogUtils.hideDialog(context); GifLoaderDialogUtils.hideDialog(context);
if (res['MessageStatus'] == 1) { if (res['MessageStatus'] == 1) {
if (res['List_IsPatientHasOnGoingEstimation'].length != 0) { if (res['List_IsPatientHasOnGoingEstimation'].length != 0) {
@ -177,11 +179,11 @@ class _DentalComplaintsState extends State<DentalComplaints> {
], ],
), ),
); );
dentalProceduresModel.listIsPatientHasOnGoingEstimation.forEach((procedure) { dentalProceduresModel.listIsPatientHasOnGoingEstimation!.forEach((procedure) {
tableRow.add(TableRow(children: [ tableRow.add(TableRow(children: [
Container( Container(
margin: EdgeInsets.all(12.0), margin: EdgeInsets.all(12.0),
child: Text(procedure.procedureName, style: TextStyle(fontSize: 12, fontWeight: FontWeight.w600, letterSpacing: -0.46)), child: Text(procedure.procedureName!, style: TextStyle(fontSize: 12, fontWeight: FontWeight.w600, letterSpacing: -0.46)),
), ),
Container( Container(
margin: EdgeInsets.all(12.0), margin: EdgeInsets.all(12.0),
@ -211,12 +213,13 @@ class _DentalComplaintsState extends State<DentalComplaints> {
GifLoaderDialogUtils.showMyDialog(context); GifLoaderDialogUtils.showMyDialog(context);
int appoTime = 0; int appoTime = 0;
service.getDoctorsList(int.parse("17"), widget.searchInfo.ProjectID, false, context, isContinueDentalPlan: true).then((res) { service.getDoctorsList(int.parse("17"), widget.searchInfo.ProjectID!, false, context, isContinueDentalPlan: true).then((res) {
GifLoaderDialogUtils.hideDialog(context); GifLoaderDialogUtils.hideDialog(context);
if (res['MessageStatus'] == 1) { if (res['MessageStatus'] == 1) {
dentalProceduresModel = DentalProceduresModel.fromJson(res); dentalProceduresModel = DentalProceduresModel.fromJson(res as Map<String, dynamic>);
dentalProceduresModel.listIsPatientHasOnGoingEstimation.forEach((procedure) { //Changed by Aamir added Map into string dynamic
appoTime += procedure.neededTime; dentalProceduresModel.listIsPatientHasOnGoingEstimation!.forEach((procedure) {
appoTime += procedure.neededTime!;
}); });
setState(() { setState(() {
hasDentalPlan = true; hasDentalPlan = true;
@ -236,7 +239,7 @@ class _DentalComplaintsState extends State<DentalComplaints> {
.toList(); .toList();
if (doctorByHospital.length != 0) { if (doctorByHospital.length != 0) {
patientDoctorAppointmentListHospital[patientDoctorAppointmentListHospital.indexOf(doctorByHospital[0])].patientDoctorAppointmentList.add(element); patientDoctorAppointmentListHospital[patientDoctorAppointmentListHospital.indexOf(doctorByHospital[0])].patientDoctorAppointmentList!.add(element);
} else { } else {
patientDoctorAppointmentListHospital patientDoctorAppointmentListHospital
.add(PatientDoctorAppointmentList(filterName: element.projectName, distanceInKMs: element.projectDistanceInKiloMeters.toString(), patientDoctorAppointment: element)); .add(PatientDoctorAppointmentList(filterName: element.projectName, distanceInKMs: element.projectDistanceInKiloMeters.toString(), patientDoctorAppointment: element));
@ -257,7 +260,7 @@ class _DentalComplaintsState extends State<DentalComplaints> {
GifLoaderDialogUtils.showMyDialog(context); GifLoaderDialogUtils.showMyDialog(context);
getLanguageID(); getLanguageID();
ClinicListService service = new ClinicListService(); ClinicListService service = new ClinicListService();
service.getChiefComplaintsList(widget.searchInfo.ClinicID, widget.searchInfo.ProjectID, context).then((res) { service.getChiefComplaintsList(widget.searchInfo.ClinicID!, widget.searchInfo.ProjectID!, context).then((res) {
GifLoaderDialogUtils.hideDialog(context); GifLoaderDialogUtils.hideDialog(context);
if (res['MessageStatus'] == 1) { if (res['MessageStatus'] == 1) {
setState(() { setState(() {

@ -26,20 +26,20 @@ class BookReminderPage extends StatefulWidget {
String appoDateFormatted; String appoDateFormatted;
String appoTimeFormatted; String appoTimeFormatted;
DateTime dateTime; DateTime? dateTime;
BookReminderPage({@required this.patientShareResponse, @required this.docObject, @required this.appoDateFormatted, @required this.appoTimeFormatted, this.dateTime}); BookReminderPage({required this.patientShareResponse, required this.docObject, required this.appoDateFormatted, required this.appoTimeFormatted, this.dateTime});
@override @override
_BookReminderPageState createState() => _BookReminderPageState(); _BookReminderPageState createState() => _BookReminderPageState();
} }
class _BookReminderPageState extends State<BookReminderPage> { class _BookReminderPageState extends State<BookReminderPage> {
MyInAppBrowser browser; late MyInAppBrowser browser;
final ChromeSafariBrowser chromeBrowser = new MyChromeSafariBrowser(new MyInAppBrowser()); final ChromeSafariBrowser chromeBrowser = new MyChromeSafariBrowser(new MyInAppBrowser());
String selectedTime; String? selectedTime;
bool isSuccessShow = true; bool isSuccessShow = true;
@override @override
@ -55,13 +55,13 @@ class _BookReminderPageState extends State<BookReminderPage> {
}); });
} }
ProjectViewModel projectViewModel; late ProjectViewModel projectViewModel;
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
projectViewModel = Provider.of<ProjectViewModel>(context); projectViewModel = Provider.of<ProjectViewModel>(context);
return AppScaffold( return AppScaffold(
appBarTitle: widget.docObject.doctorTitle + " " + widget.docObject.name, appBarTitle: widget.docObject.doctorTitle! + " " + widget.docObject.name!,
isShowDecPage: false, isShowDecPage: false,
isShowAppBar: true, isShowAppBar: true,
showNewAppBarTitle: true, showNewAppBarTitle: true,
@ -73,18 +73,18 @@ class _BookReminderPageState extends State<BookReminderPage> {
children: <Widget>[ children: <Widget>[
DoctorHeader( DoctorHeader(
headerModel: HeaderModel( headerModel: HeaderModel(
widget.docObject.name, widget.docObject.name!,
widget.docObject.doctorID, widget.docObject.doctorID!,
widget.docObject.doctorImageURL, widget.docObject.doctorImageURL!,
widget.docObject.speciality, widget.docObject.speciality!,
"", "",
widget.docObject.projectName, widget.docObject.projectName!,
null, null,
null, null,
widget.docObject.nationalityFlagURL, widget.docObject.nationalityFlagURL!,
widget.docObject.doctorRate, widget.docObject.doctorRate!,
null, null,
widget.docObject.noOfPatientsRate, widget.docObject.noOfPatientsRate!,
"", "",
), ),
isNeedToShowButton: false, isNeedToShowButton: false,
@ -190,8 +190,8 @@ class _BookReminderPageState extends State<BookReminderPage> {
print(widget.patientShareResponse.appointmentNo); print(widget.patientShareResponse.appointmentNo);
showReminderDialog( showReminderDialog(
context, context,
widget.dateTime, widget.dateTime!,
widget.docObject.name, widget.docObject.name!,
widget.patientShareResponse.appointmentNo.toString(), widget.patientShareResponse.appointmentNo.toString(),
widget.appoDateFormatted, widget.appoDateFormatted,
widget.appoTimeFormatted, widget.appoTimeFormatted,

@ -14,7 +14,7 @@ class BranchView extends StatefulWidget {
final int num; final int num;
const BranchView( const BranchView(
{Key key, this.doctorsList, this.result, this.resultDistance, this.num}) {Key? key, required this.doctorsList, required this.result, required this.resultDistance, required this.num})
: super(key: key); : super(key: key);
@override @override
@ -45,14 +45,14 @@ class _BranchViewState extends State<BranchView> {
} }
class ExpandableListView extends StatefulWidget { class ExpandableListView extends StatefulWidget {
final List<String> result2; final List<String>? result2;
final List<String> resultDistance; final List<String>? resultDistance;
final List<DoctorList> doctorsList2; final List<DoctorList>? doctorsList2;
final val; final val;
static int doctorListheight = 0; static int doctorListheight = 0;
final bool isExpanded; final bool? isExpanded;
const ExpandableListView( const ExpandableListView(
{Key key, {Key? key,
this.result2, this.result2,
this.resultDistance, this.resultDistance,
this.val, this.val,
@ -69,8 +69,8 @@ class _ExpandableListViewState extends State<ExpandableListView> {
@override @override
void initState() { void initState() {
setState(() { setState(() {
expandFlag = widget.isExpanded; expandFlag = widget.isExpanded!;
setDoctorViewHeight(widget.result2[widget.val].toString()); setDoctorViewHeight(widget.result2![widget.val].toString());
}); });
super.initState(); super.initState();
} }
@ -98,10 +98,10 @@ class _ExpandableListViewState extends State<ExpandableListView> {
mainAxisAlignment: MainAxisAlignment.spaceBetween, mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: <Widget>[ children: <Widget>[
new Text( new Text(
widget.result2[widget.val].toString() + widget.result2![widget.val].toString() +
" " + " " +
getProjectDistance( getProjectDistance(
widget.resultDistance[widget.val].toString()), widget.resultDistance![widget.val].toString()),
style: new TextStyle( style: new TextStyle(
fontWeight: FontWeight.bold, color: Colors.black), fontWeight: FontWeight.bold, color: Colors.black),
), ),
@ -128,7 +128,7 @@ class _ExpandableListViewState extends State<ExpandableListView> {
expandFlag = !expandFlag; expandFlag = !expandFlag;
if (expandFlag == true) { if (expandFlag == true) {
setDoctorViewHeight( setDoctorViewHeight(
widget.result2[widget.val].toString()); widget.result2![widget.val].toString());
} }
}); });
}), }),
@ -143,13 +143,13 @@ class _ExpandableListViewState extends State<ExpandableListView> {
shrinkWrap: true, shrinkWrap: true,
physics: ScrollPhysics(), physics: ScrollPhysics(),
padding: EdgeInsets.all(0.0), padding: EdgeInsets.all(0.0),
itemCount: widget.doctorsList2.length, itemCount: widget.doctorsList2!.length,
itemBuilder: (context, index) { itemBuilder: (context, index) {
return widget.result2[widget.val].toString() == return widget.result2![widget.val].toString() ==
widget.doctorsList2[index].projectName.toString() widget.doctorsList2![index].projectName.toString()
? DoctorView( ? DoctorView(
//AJ note //AJ note
doctor: widget.doctorsList2[index], doctor: widget.doctorsList2![index],
isLiveCareAppointment: false, isLiveCareAppointment: false,
// widget.doctorsList2[index] // widget.doctorsList2[index]
) )
@ -166,7 +166,7 @@ class _ExpandableListViewState extends State<ExpandableListView> {
setDoctorViewHeight(name) { setDoctorViewHeight(name) {
ExpandableListView.doctorListheight = ExpandableListView.doctorListheight =
widget.doctorsList2.where((e) => e.projectName == name).toList().length; widget.doctorsList2!.where((e) => e.projectName == name).toList().length;
} }
String getProjectDistance(String distance) { String getProjectDistance(String distance) {
@ -188,7 +188,7 @@ class ExpandableContainer extends StatelessWidget {
final Widget child; final Widget child;
ExpandableContainer({ ExpandableContainer({
@required this.child, required this.child,
this.collapsedHeight = 0.0, this.collapsedHeight = 0.0,
this.expandedHeight = 300.0, this.expandedHeight = 300.0,
this.expanded = true, this.expanded = true,

@ -20,7 +20,7 @@ class CardBottom extends StatelessWidget {
decoration: BoxDecoration( decoration: BoxDecoration(
boxShadow: [ boxShadow: [
BoxShadow( BoxShadow(
color: Colors.grey[300], color: Colors.grey[300]!,
blurRadius: 3.0, blurRadius: 3.0,
spreadRadius: 0.0, spreadRadius: 0.0,
// offset: Offset(2.0), // shadow direction: bottom right // offset: Offset(2.0), // shadow direction: bottom right

@ -11,10 +11,10 @@ class CardCommon extends StatelessWidget {
final type; final type;
const CardCommon( const CardCommon(
{@required this.image, {required this.image,
@required this.text, required this.text,
@required this.subText, required this.subText,
@required this.type}); required this.type});
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
@ -25,7 +25,7 @@ class CardCommon extends StatelessWidget {
child: Container( child: Container(
margin: EdgeInsets.fromLTRB(9.0, 9.0, 9.0, 9.0), margin: EdgeInsets.fromLTRB(9.0, 9.0, 9.0, 9.0),
decoration: BoxDecoration(boxShadow: [ decoration: BoxDecoration(boxShadow: [
BoxShadow(color: Colors.grey[400], blurRadius: 2.0, spreadRadius: 0.0) BoxShadow(color: Colors.grey[400]!, blurRadius: 2.0, spreadRadius: 0.0)
], borderRadius: BorderRadius.circular(10), color: Colors.white), ], borderRadius: BorderRadius.circular(10), color: Colors.white),
child: Column( child: Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,

@ -7,10 +7,10 @@ class CardHome extends StatelessWidget {
final textColor; final textColor;
const CardHome( const CardHome(
{@required this.image, {required this.image,
@required this.backgroundImage, required this.backgroundImage,
@required this.text, required this.text,
@required this.textColor}); required this.textColor});
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
@ -22,7 +22,7 @@ class CardHome extends StatelessWidget {
decoration: BoxDecoration( decoration: BoxDecoration(
boxShadow: [ boxShadow: [
BoxShadow( BoxShadow(
color: Colors.grey[400], color: Colors.grey[400]!,
blurRadius: 2.0, blurRadius: 2.0,
spreadRadius: 0.0 spreadRadius: 0.0
) )

@ -10,12 +10,12 @@ import 'package:flutter/material.dart';
// ignore: must_be_immutable // ignore: must_be_immutable
class DentalComplaintCard extends StatefulWidget { class DentalComplaintCard extends StatefulWidget {
final ListDentalChiefComplain listDentalChiefComplain; final ListDentalChiefComplain listDentalChiefComplain;
VoidCallback logAnalytics; late VoidCallback logAnalytics;
var languageID; var languageID;
Function onSelectedMethod; Function? onSelectedMethod;
bool isDoctorNameSearch; bool isDoctorNameSearch;
DentalComplaintCard({@required this.listDentalChiefComplain, this.languageID, this.onSelectedMethod, this.isDoctorNameSearch = false}); DentalComplaintCard({required this.listDentalChiefComplain, this.languageID, this.onSelectedMethod, this.isDoctorNameSearch = false});
@override @override
_DentalComplaintCardState createState() => _DentalComplaintCardState(); _DentalComplaintCardState createState() => _DentalComplaintCardState();
@ -43,7 +43,7 @@ class _DentalComplaintCardState extends State<DentalComplaintCard> {
children: <Widget>[ children: <Widget>[
Container( Container(
child: Text( child: Text(
widget.listDentalChiefComplain.name, widget.listDentalChiefComplain.name!,
style: TextStyle( style: TextStyle(
fontSize: 16.0, fontSize: 16.0,
color: Colors.black, color: Colors.black,
@ -65,7 +65,7 @@ class _DentalComplaintCardState extends State<DentalComplaintCard> {
GifLoaderDialogUtils.showMyDialog(context); GifLoaderDialogUtils.showMyDialog(context);
ClinicListService service = new ClinicListService(); ClinicListService service = new ClinicListService();
service.getChiefComplaintDoctorList(widget.listDentalChiefComplain.iD, widget.listDentalChiefComplain.projectID, context).then((res) { service.getChiefComplaintDoctorList(widget.listDentalChiefComplain.iD!, widget.listDentalChiefComplain.projectID!, context).then((res) {
GifLoaderDialogUtils.hideDialog(context); GifLoaderDialogUtils.hideDialog(context);
if (res['MessageStatus'] == 1) { if (res['MessageStatus'] == 1) {
print(res['List_DentalDoctorChiefComplaintMapping']); print(res['List_DentalDoctorChiefComplaintMapping']);
@ -83,7 +83,7 @@ class _DentalComplaintCardState extends State<DentalComplaintCard> {
.toList(); .toList();
if (doctorByHospital.length != 0) { if (doctorByHospital.length != 0) {
_patientDoctorAppointmentListHospital[_patientDoctorAppointmentListHospital.indexOf(doctorByHospital[0])].patientDoctorAppointmentList.add(element); _patientDoctorAppointmentListHospital[_patientDoctorAppointmentListHospital.indexOf(doctorByHospital[0])].patientDoctorAppointmentList!.add(element);
} else { } else {
_patientDoctorAppointmentListHospital _patientDoctorAppointmentListHospital
.add(PatientDoctorAppointmentList(filterName: element.projectName, distanceInKMs: element.projectDistanceInKiloMeters.toString(), patientDoctorAppointment: element)); .add(PatientDoctorAppointmentList(filterName: element.projectName, distanceInKMs: element.projectDistanceInKiloMeters.toString(), patientDoctorAppointment: element));

@ -17,8 +17,8 @@ import 'package:diplomaticquarterapp/widgets/dragable_sheet.dart';
import 'package:diplomaticquarterapp/widgets/my_rich_text.dart'; import 'package:diplomaticquarterapp/widgets/my_rich_text.dart';
import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart'; import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter_rating_bar/flutter_rating_bar.dart';
import 'package:provider/provider.dart'; import 'package:provider/provider.dart';
import 'package:rating_bar/rating_bar.dart';
import '../DoctorProfile.dart'; import '../DoctorProfile.dart';
@ -28,19 +28,19 @@ class DoctorView extends StatelessWidget {
bool isObGyneAppointment; bool isObGyneAppointment;
bool isShowFlag; bool isShowFlag;
bool isDoctorNameSearch; bool isDoctorNameSearch;
OBGyneProcedureListResponse obGyneProcedureListResponse; OBGyneProcedureListResponse? obGyneProcedureListResponse;
final VoidCallback onTap; final VoidCallback? onTap;
DoctorView( DoctorView(
{@required this.doctor, {required this.doctor,
@required this.isLiveCareAppointment, required this.isLiveCareAppointment,
this.isObGyneAppointment = false, this.isObGyneAppointment = false,
this.isDoctorNameSearch = false, this.isDoctorNameSearch = false,
this.isShowFlag = true, this.isShowFlag = true,
this.onTap, this.onTap,
this.obGyneProcedureListResponse}); this.obGyneProcedureListResponse});
ProjectViewModel projectViewModel; late ProjectViewModel projectViewModel;
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
@ -83,7 +83,7 @@ class DoctorView extends StatelessWidget {
children: [ children: [
Expanded( Expanded(
child: Text( child: Text(
doctor.name, doctor.name!,
style: TextStyle(fontSize: 16, fontWeight: FontWeight.w600, color: Color(0xff2E303A), letterSpacing: -0.64, height: 25 / 16), style: TextStyle(fontSize: 16, fontWeight: FontWeight.w600, color: Color(0xff2E303A), letterSpacing: -0.64, height: 25 / 16),
), ),
), ),
@ -98,8 +98,8 @@ class DoctorView extends StatelessWidget {
mainAxisSize: MainAxisSize.min, mainAxisSize: MainAxisSize.min,
children: <Widget>[ children: <Widget>[
LargeAvatar( LargeAvatar(
name: doctor.name, name: doctor.name!,
url: doctor.doctorImageURL, url: doctor.doctorImageURL!,
width: 48, width: 48,
height: 48, height: 48,
), ),
@ -109,11 +109,11 @@ class DoctorView extends StatelessWidget {
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
mainAxisSize: MainAxisSize.min, mainAxisSize: MainAxisSize.min,
children: <Widget>[ children: <Widget>[
if (doctor.clinicName != null) MyRichText(TranslationBase.of(context).clinic + ":", doctor.clinicName, projectViewModel.isArabic), if (doctor.clinicName != null) MyRichText(TranslationBase.of(context).clinic + ":", doctor.clinicName!, projectViewModel.isArabic),
if (doctor.projectName != null) MyRichText(TranslationBase.of(context).branch, doctor.projectName, projectViewModel.isArabic), if (doctor.projectName != null) MyRichText(TranslationBase.of(context).branch, doctor.projectName!, projectViewModel.isArabic),
if (doctor.speciality != null && doctor.speciality.length > 0) if (doctor.speciality != null && doctor.speciality!.length > 0)
Text( Text(
this.doctor.speciality[0].trim(), this.doctor.speciality![0].trim(),
// getDoctorSpeciality(this.doctor.speciality).trim(), // getDoctorSpeciality(this.doctor.speciality).trim(),
style: TextStyle(fontSize: 12, fontWeight: FontWeight.w600, color: Color(0xff2E303A), letterSpacing: -0.48, height: 18 / 12), style: TextStyle(fontSize: 12, fontWeight: FontWeight.w600, color: Color(0xff2E303A), letterSpacing: -0.48, height: 18 / 12),
), ),
@ -126,16 +126,35 @@ class DoctorView extends StatelessWidget {
mainAxisAlignment: MainAxisAlignment.spaceBetween, mainAxisAlignment: MainAxisAlignment.spaceBetween,
mainAxisSize: MainAxisSize.max, mainAxisSize: MainAxisSize.max,
children: <Widget>[ children: <Widget>[
RatingBar.readOnly( //changed By Aamir
initialRating: this.doctor.actualDoctorRate.toDouble(), RatingBar(
size: 16.0, initialRating: 3,
filledColor: Color(0XFFD02127), direction: Axis.horizontal,
emptyColor: Color(0XFFD02127), allowHalfRating: true,
isHalfAllowed: true, itemCount: 5,
halfFilledIcon: Icons.star_half, itemSize: 20,
filledIcon: Icons.star, ignoreGestures: true,
emptyIcon: Icons.star_border, ratingWidget: RatingWidget(
full: Icon(Icons.star),
half: Icon(Icons.star_half),
empty: Icon(Icons.star),
), ),
tapOnlyMode: true,
itemPadding: EdgeInsets.symmetric(horizontal: 4.0),
onRatingUpdate: (rating) {
print(rating);
},
),
// RatingBar.readOnly(
// initialRating: this.doctor.actualDoctorRate!.toDouble(),
// size: 16.0,
// filledColor: Color(0XFFD02127),
// emptyColor: Color(0XFFD02127),
// isHalfAllowed: true,
// halfFilledIcon: Icons.star_half,
// filledIcon: Icons.star,
// emptyIcon: Icons.star_border,
// ),
if (isShowFlag) if (isShowFlag)
Icon( Icon(
Icons.arrow_forward, Icons.arrow_forward,
@ -169,9 +188,14 @@ class DoctorView extends StatelessWidget {
searchInfo.hospital = selectedHospital; searchInfo.hospital = selectedHospital;
searchInfo.clinic = selectedClinic; searchInfo.clinic = selectedClinic;
showDraggableDialog(context, DentalComplaints(isDoctorNameSearch: true, onSelectedMethod: () { showDraggableDialog(
context,
DentalComplaints(
isDoctorNameSearch: true,
onSelectedMethod: () {
Navigator.pop(context); Navigator.pop(context);
}, searchInfo: searchInfo)); },
searchInfo: searchInfo));
} }
String getDoctorSpeciality(List<String> docSpecial) { String getDoctorSpeciality(List<String> docSpecial) {
@ -186,7 +210,7 @@ class DoctorView extends StatelessWidget {
GifLoaderDialogUtils.showMyDialog(context); GifLoaderDialogUtils.showMyDialog(context);
List<DoctorProfileList> docProfileList = []; List<DoctorProfileList> docProfileList = [];
DoctorsListService service = new DoctorsListService(); DoctorsListService service = new DoctorsListService();
service.getDoctorsProfile(docObject.doctorID, docObject.clinicID, docObject.projectID, context).then((res) { service.getDoctorsProfile(docObject.doctorID!, docObject.clinicID!, docObject.projectID!, context).then((res) {
GifLoaderDialogUtils.hideDialog(context); GifLoaderDialogUtils.hideDialog(context);
if (res['MessageStatus'] == 1) { if (res['MessageStatus'] == 1) {
if (res['DoctorProfileList'].length != 0) { if (res['DoctorProfileList'].length != 0) {
@ -230,7 +254,7 @@ class DoctorView extends StatelessWidget {
void next(BuildContext context) { void next(BuildContext context) {
Navigator.push(context, Navigator.push(context,
FadePage(page: ObGyneTimeSlots(projectID: doctor.projectID, selectedClinicID: doctor.clinicID, selectedDoctorID: doctor.doctorID, obGyneProcedureListResponse: obGyneProcedureListResponse))); FadePage(page: ObGyneTimeSlots(projectID: doctor.projectID!, selectedClinicID: doctor.clinicID!, selectedDoctorID: doctor.doctorID!, obGyneProcedureListResponse: obGyneProcedureListResponse!)));
} }
Future navigateToDoctorProfile(context, docObject, docProfile, {isAppo}) async { Future navigateToDoctorProfile(context, docObject, docProfile, {isAppo}) async {

@ -2,7 +2,7 @@ import 'package:flutter/material.dart';
import 'package:flutter_svg/flutter_svg.dart'; import 'package:flutter_svg/flutter_svg.dart';
class TopCard extends StatelessWidget { class TopCard extends StatelessWidget {
TopCard({@required this.image, @required this.isSVG}); TopCard({required this.image, required this.isSVG});
final String image; final String image;
final bool isSVG; final bool isSVG;
@ -21,9 +21,7 @@ class TopCard extends StatelessWidget {
height: 100.0, height: 100.0,
padding: EdgeInsets.all(7.0), padding: EdgeInsets.all(7.0),
width: MediaQuery.of(context).size.width * 0.45, width: MediaQuery.of(context).size.width * 0.45,
child: this.isSVG child: this.isSVG ? SvgPicture.asset(this.image) : Image.asset(this.image),
? SvgPicture.asset(this.image)
: Image.asset(this.image),
), ),
), ),
); );

@ -20,23 +20,23 @@ Future<Map<Permission, PermissionStatus>> requestPermissions() async {
} }
showReminderDialog(BuildContext context, DateTime dateTime, String doctorName, String eventId, String appoDateFormatted, String appoTimeFormatted, showReminderDialog(BuildContext context, DateTime dateTime, String doctorName, String eventId, String appoDateFormatted, String appoTimeFormatted,
{Function onSuccess, String title, String description, Function(int) onMultiDateSuccess}) async { {required Function onSuccess, String? title, String? description, Function(int)? onMultiDateSuccess}) async {
if (Platform.isAndroid) { if (Platform.isAndroid) {
if (await PermissionService.isCalendarPermissionEnabled()) { if (await PermissionService.isCalendarPermissionEnabled()) {
_showReminderDialog(context, dateTime, doctorName, eventId, appoDateFormatted, appoTimeFormatted, _showReminderDialog(context, dateTime, doctorName, eventId, appoDateFormatted, appoTimeFormatted,
onSuccess: onSuccess, title: title, description: description, onMultiDateSuccess: onMultiDateSuccess); onSuccess: onSuccess, title: title!, description: description!, onMultiDateSuccess: onMultiDateSuccess!);
} else { } else {
Utils.showPermissionConsentDialog(context, TranslationBase.of(context).calendarPermission, () async { Utils.showPermissionConsentDialog(context, TranslationBase.of(context).calendarPermission, () async {
if (await Permission.calendar.request().isGranted) { if (await Permission.calendar.request().isGranted) {
_showReminderDialog(context, dateTime, doctorName, eventId, appoDateFormatted, appoTimeFormatted, _showReminderDialog(context, dateTime, doctorName, eventId, appoDateFormatted, appoTimeFormatted,
onSuccess: onSuccess, title: title, description: description, onMultiDateSuccess: onMultiDateSuccess); onSuccess: onSuccess, title: title!, description: description!, onMultiDateSuccess: onMultiDateSuccess!);
} }
}); });
} }
} else { } else {
if (await Permission.calendar.request().isGranted) { if (await Permission.calendar.request().isGranted) {
_showReminderDialog(context, dateTime, doctorName, eventId, appoDateFormatted, appoTimeFormatted, _showReminderDialog(context, dateTime, doctorName, eventId, appoDateFormatted, appoTimeFormatted,
onSuccess: onSuccess, title: title, description: description, onMultiDateSuccess: onMultiDateSuccess); onSuccess: onSuccess, title: title!, description: description!, onMultiDateSuccess: onMultiDateSuccess!);
} }
} }
} }
@ -44,7 +44,7 @@ showReminderDialog(BuildContext context, DateTime dateTime, String doctorName, S
final CalendarPlugin _myPlugin = CalendarPlugin(); final CalendarPlugin _myPlugin = CalendarPlugin();
Future<void> _showReminderDialog(BuildContext context, DateTime dateTime, String doctorName, String eventId, String appoDateFormatted, String appoTimeFormatted, Future<void> _showReminderDialog(BuildContext context, DateTime dateTime, String doctorName, String eventId, String appoDateFormatted, String appoTimeFormatted,
{Function onSuccess, String title, String description, Function(int) onMultiDateSuccess}) async { {required Function onSuccess, required String title, required String description, required Function(int) onMultiDateSuccess}) async {
return showDialog<void>( return showDialog<void>(
context: context, context: context,
barrierDismissible: true, // user must tap button! barrierDismissible: true, // user must tap button!
@ -57,23 +57,23 @@ Future<void> _showReminderDialog(BuildContext context, DateTime dateTime, String
String text = ""; String text = "";
if (i == 0) { if (i == 0) {
// Before 30 mints // Before 30 mints
dateTime = Jiffy(dateTime).subtract(minutes: 30).dateTime; dateTime = Jiffy.parseFromDateTime(dateTime).subtract(minutes: 30).dateTime;
text = "30 minutes"; text = "30 minutes";
// dateTime.add(new Duration(minutes: -30)); // dateTime.add(new Duration(minutes: -30));
} else if (i == 1) { } else if (i == 1) {
// Before 1 hour // Before 1 hour
// dateTime.add(new Duration(minutes: -60)); // dateTime.add(new Duration(minutes: -60));
dateTime = Jiffy(dateTime).subtract(hours: 1).dateTime; dateTime = Jiffy.parseFromDateTime(dateTime).subtract(hours: 1).dateTime;
text = "1 hours"; text = "1 hours";
} else if (i == 2) { } else if (i == 2) {
// Before 1 hour and 30 mints // Before 1 hour and 30 mints
// dateTime.add(new Duration(minutes: -90)); // dateTime.add(new Duration(minutes: -90));
dateTime = Jiffy(dateTime).subtract(hours: 1, minutes: 30).dateTime; dateTime = Jiffy.parseFromDateTime(dateTime).subtract(hours: 1, minutes: 30).dateTime;
text = "1 hours 30 minutes"; text = "1 hours 30 minutes";
} else if (i == 3) { } else if (i == 3) {
// Before 2 hours // Before 2 hours
// dateTime.add(new Duration(minutes: -120)); // dateTime.add(new Duration(minutes: -120));
dateTime = Jiffy(dateTime).subtract(hours: 2).dateTime; dateTime = Jiffy.parseFromDateTime(dateTime).subtract(hours: 2).dateTime;
text = "2 hours"; text = "2 hours";
} }
@ -100,7 +100,7 @@ Future<void> _showReminderDialog(BuildContext context, DateTime dateTime, String
} }
class ReminderDialog extends StatefulWidget { class ReminderDialog extends StatefulWidget {
Function onClick; Function? onClick;
ReminderDialog({this.onClick}); ReminderDialog({this.onClick});
@ -164,9 +164,9 @@ class _ReminderDialogState extends State<ReminderDialog> {
Radio<int>( Radio<int>(
value: 0, value: 0,
groupValue: i, groupValue: i,
onChanged: (int value) { onChanged: (int? value) {
setState(() { setState(() {
i = value; i = value!;
}); });
}, },
), ),
@ -185,9 +185,9 @@ class _ReminderDialogState extends State<ReminderDialog> {
Radio<int>( Radio<int>(
value: 1, value: 1,
groupValue: i, groupValue: i,
onChanged: (int value) { onChanged: (int? value) {
setState(() { setState(() {
i = value; i = value!;
}); });
}, },
), ),
@ -206,9 +206,9 @@ class _ReminderDialogState extends State<ReminderDialog> {
Radio<int>( Radio<int>(
value: 2, value: 2,
groupValue: i, groupValue: i,
onChanged: (int value) { onChanged: (int? value) {
setState(() { setState(() {
i = value; i = value!;
}); });
}, },
), ),
@ -227,9 +227,9 @@ class _ReminderDialogState extends State<ReminderDialog> {
Radio<int>( Radio<int>(
value: 3, value: 3,
groupValue: i, groupValue: i,
onChanged: (int value) { onChanged: (int? value) {
setState(() { setState(() {
i = value; i = value!;
}); });
}, },
), ),
@ -247,7 +247,7 @@ class _ReminderDialogState extends State<ReminderDialog> {
DefaultButton( DefaultButton(
TranslationBase.of(context).save, TranslationBase.of(context).save,
() { () {
widget.onClick(i); widget.onClick!(i);
Navigator.pop(context); Navigator.pop(context);
}, },
color: CustomColors.green, color: CustomColors.green,

@ -335,7 +335,7 @@ class DoctorsListService extends BaseService {
} }
Future<Map> insertAppointment(int docID, int clinicID, int projectID, String selectedTime, String selectedDate, int initialSlotDuration, BuildContext context, Future<Map> insertAppointment(int docID, int clinicID, int projectID, String selectedTime, String selectedDate, int initialSlotDuration, BuildContext context,
[String procedureID, num testTypeEnum, num testProcedureEnum, ProjectViewModel projectViewModel]) async { [String? procedureID, num? testTypeEnum, num? testProcedureEnum, required ProjectViewModel projectViewModel]) async {
Map<String, dynamic> request; Map<String, dynamic> request;
if (await this.sharedPref.getObject(USER_PROFILE) != null) { if (await this.sharedPref.getObject(USER_PROFILE) != null) {
@ -380,12 +380,12 @@ class DoctorsListService extends BaseService {
}; };
if (clinicID == 253) { if (clinicID == 253) {
List<String> procedureID = projectViewModel.selectedBodyPartList.map((element) => element.id.toString()).toList(); List<String> procedureID = projectViewModel!.selectedBodyPartList!.map((element) => element.id.toString()).toList();
request["GeneralProcedureList"] = procedureID; request["GeneralProcedureList"] = procedureID;
if (procedureID.length == 1 && procedureID[0] == "1") { if (procedureID.length == 1 && procedureID[0] == "1") {
request["InitialSlotDuration"] = 90; request["InitialSlotDuration"] = 90;
} else { } else {
request["InitialSlotDuration"] = projectViewModel.laserSelectionDuration; request["InitialSlotDuration"] = projectViewModel!.laserSelectionDuration!;
} }
} }

@ -467,11 +467,11 @@ class MyInAppBrowser extends InAppBrowser {
} }
class MyChromeSafariBrowser extends ChromeSafariBrowser { class MyChromeSafariBrowser extends ChromeSafariBrowser {
final Function onExitCallback; final Function? onExitCallback;
final Function onLoadStartCallback; final Function? onLoadStartCallback;
AppoitmentAllHistoryResultList appo; AppoitmentAllHistoryResultList? appo;
MyChromeSafariBrowser(browserFallback, {required this.onExitCallback, required this.onLoadStartCallback, required this.appo}); MyChromeSafariBrowser(browserFallback, { this.onExitCallback, this.onLoadStartCallback, this.appo});
@override @override
void onOpened() { void onOpened() {
@ -481,13 +481,13 @@ class MyChromeSafariBrowser extends ChromeSafariBrowser {
@override @override
void onCompletedInitialLoad() { void onCompletedInitialLoad() {
print("ChromeSafari browser initial load completed"); print("ChromeSafari browser initial load completed");
onLoadStartCallback("ApplePay"); onLoadStartCallback!("ApplePay");
} }
@override @override
void onClosed() { void onClosed() {
print("ChromeSafari browser closed"); print("ChromeSafari browser closed");
MyInAppBrowser.isPaymentDone = true; MyInAppBrowser.isPaymentDone = true;
onExitCallback(); onExitCallback!();
} }
} }

@ -92,12 +92,12 @@ class DoctorHeader extends StatelessWidget {
children: [ children: [
if (headerModel.date != null) if (headerModel.date != null)
Text( Text(
DateUtil.getDayMonthYearDateFormatted(headerModel.date), DateUtil.getDayMonthYearDateFormatted(headerModel.date!),
style: TextStyle(fontSize: 14, fontWeight: FontWeight.w600, color: Color(0xff2B353E), letterSpacing: -0.48, height: 18 / 12), style: TextStyle(fontSize: 14, fontWeight: FontWeight.w600, color: Color(0xff2B353E), letterSpacing: -0.48, height: 18 / 12),
), ),
if (headerModel.time != null) if (headerModel.time != null)
Text( Text(
headerModel.time ?? DateUtil.formatDateToTime(headerModel.date), headerModel.time ?? DateUtil.formatDateToTime(headerModel.date!),
style: TextStyle(fontSize: 14, fontWeight: FontWeight.w600, color: Color(0xff2B353E), letterSpacing: -0.48, height: 18 / 12), style: TextStyle(fontSize: 14, fontWeight: FontWeight.w600, color: Color(0xff2B353E), letterSpacing: -0.48, height: 18 / 12),
), ),
if (headerModel?.nationalityFlagURL != null) if (headerModel?.nationalityFlagURL != null)

Loading…
Cancel
Save