models updates -> 3.13.6

dev_v3.13.6_voipcall
devamirsaleemahmad 1 year ago
parent 9c2948db29
commit b26f535749

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

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

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

@ -42,10 +42,10 @@ class BookConfirm extends StatefulWidget {
bool isLiveCareAppointment;
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;
PatientShareResponse patientShareResponse;
late DoctorsListService service;
late PatientShareResponse patientShareResponse;
// AuthenticatedUser authUser;
@ -54,8 +54,8 @@ class BookConfirm extends StatefulWidget {
}
class _BookConfirmState extends State<BookConfirm> {
ProjectViewModel projectViewModel;
ToDoCountProviderModel toDoProvider;
late ProjectViewModel projectViewModel;
late ToDoCountProviderModel toDoProvider;
AppSharedPreferences sharedPref = new AppSharedPreferences();
@ -77,7 +77,7 @@ class _BookConfirmState extends State<BookConfirm> {
toDoProvider = Provider.of<ToDoCountProviderModel>(context);
projectViewModel = Provider.of(context);
return AppScaffold(
appBarTitle: widget.doctor.doctorTitle + " " + widget.doctor.name,
appBarTitle: widget.doctor.doctorTitle! + " " + widget.doctor.name!,
isShowDecPage: false,
isShowAppBar: true,
showNewAppBarTitle: true,
@ -90,15 +90,15 @@ class _BookConfirmState extends State<BookConfirm> {
children: <Widget>[
DoctorHeader(
headerModel: HeaderModel(
widget.doctor.name,
widget.doctor.doctorID,
widget.doctor.doctorImageURL,
widget.doctor.speciality,
widget.doctor.name!,
widget.doctor.doctorID!,
widget.doctor.doctorImageURL!,
widget.doctor.speciality!,
"",
widget.doctor.projectName,
widget.doctor.projectName!,
null,
null,
widget.doctor.nationalityFlagURL,
widget.doctor.nationalityFlagURL!,
widget.doctor.doctorRate,
null,
widget.doctor.noOfPatientsRate,
@ -143,8 +143,8 @@ class _BookConfirmState extends State<BookConfirm> {
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisSize: MainAxisSize.max,
children: <Widget>[
if (!widget.isLiveCareAppointment) showInfo(TranslationBase.of(context).hospital, widget.doctor.projectName),
showInfo(TranslationBase.of(context).clinic, widget.doctor.clinicName),
if (!widget.isLiveCareAppointment) showInfo(TranslationBase.of(context).hospital, widget.doctor.projectName!),
showInfo(TranslationBase.of(context).clinic, widget.doctor.clinicName!),
showInfo(TranslationBase.of(context).date, getDate()),
showInfo(TranslationBase.of(context).time, widget.selectedTime)
],
@ -176,9 +176,9 @@ class _BookConfirmState extends State<BookConfirm> {
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisSize: MainAxisSize.max,
children: <Widget>[
showInfo(TranslationBase.of(context).name, projectViewModel.user.firstName + " " + projectViewModel.user.lastName),
showInfo(TranslationBase.of(context).gender, projectViewModel.user.genderDescription),
showInfo(TranslationBase.of(context).age, projectViewModel.user.age.toString())
showInfo(TranslationBase.of(context).name, projectViewModel.user!.firstName! + " " + projectViewModel.user!.lastName!),
showInfo(TranslationBase.of(context).gender, projectViewModel.user!.genderDescription!),
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) {
widget.service.checkPatientNphiesEligibility(docObject.projectID).then((res) {
widget.service.checkPatientNphiesEligibility(docObject.projectID!).then((res) {
GifLoaderDialogUtils.hideDialog(context);
if (res["isNphiesMatchedWithVida"]) {
getPatientShare(context, appointmentNo, docObject.clinicID, docObject.projectID, docObject);
getPatientShare(context, appointmentNo, docObject.clinicID!, docObject.projectID!, docObject);
getToDoCount();
} else {
ConfirmDialog dialog = new ConfirmDialog(
@ -308,10 +308,10 @@ class _BookConfirmState extends State<BookConfirm> {
void continueAsCash(DoctorList docObject, String appointmentNo) {
GifLoaderDialogUtils.showMyDialog(context);
widget.service.convertPatientToCash(docObject.projectID).then((res) {
widget.service.convertPatientToCash(docObject.projectID!).then((res) {
GifLoaderDialogUtils.hideDialog(context);
if (res["MessageStatus"] == 1) {
getPatientShare(context, appointmentNo, docObject.clinicID, docObject.projectID, docObject);
getPatientShare(context, appointmentNo, docObject.clinicID!, docObject.projectID!, docObject);
getToDoCount();
} else {
AppToast.showErrorToast(message: res["ErrorEndUserMessage"]);
@ -329,7 +329,7 @@ class _BookConfirmState extends State<BookConfirm> {
GifLoaderDialogUtils.showMyDialog(context);
AppoitmentAllHistoryResultList appo;
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) {
if (res['MessageStatus'] == 1) {
AppToast.showSuccessToast(message: TranslationBase.of(context).bookedSuccess);
@ -337,17 +337,17 @@ class _BookConfirmState extends State<BookConfirm> {
Future.delayed(new Duration(milliseconds: 500), () {
// checkPatientNphiesEligibility(docObject, res['AppointmentNo'], context);
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) {
print("Logs Saved");
} else {
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 {
GifLoaderDialogUtils.hideDialog(context);
appo = new AppoitmentAllHistoryResultList();
@ -376,22 +376,22 @@ 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);
projectViewModel.analytics.appointment.book_appointment_click_confirm(appointment_type: 'regular', dateTime: timeSlot!, doctor: widget.doctor);
}
insertLiveCareScheduledAppointment(context, DoctorList docObject) {
final timeSlot = DocAvailableAppointments.selectedAppoDateTime;
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.selectedDate = timeSlot!.toUtc().add(Duration(hours: 3)).toString().split(" ")[0];
widget.selectedTime = timeSlot!.toUtc().add(Duration(hours: 3)).toString().split(" ")[1].substring(0, 5);
GifLoaderDialogUtils.showMyDialog(context);
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) {
AppToast.showSuccessToast(message: TranslationBase.of(context).bookedSuccess);
print(res['AppointmentNo']);
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();
});
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;
DoctorList docObject;
MyInAppBrowser browser;
late MyInAppBrowser browser;
final ChromeSafariBrowser chromeBrowser = new MyChromeSafariBrowser(new MyInAppBrowser());
String appoDateFormatted;
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
_BookSuccessState createState() => _BookSuccessState();
@ -48,16 +48,16 @@ class _BookSuccessState extends State<BookSuccess> {
// AuthenticatedUser authUser;
ProjectViewModel projectViewModel;
late ProjectViewModel projectViewModel;
String selectedPaymentMethod = "";
String selectedInstallments = "";
String tamaraPaymentStatus;
String tamaraOrderID;
String? tamaraPaymentStatus;
String? tamaraOrderID;
@override
initState() {
WidgetsBinding.instance.addPostFrameCallback((_) async {
if (widget.patientShareResponse.isLiveCareAppointment &&
if (widget.patientShareResponse.isLiveCareAppointment! &&
(widget.patientShareResponse.patientShareWithTax.toString() == "0" || widget.patientShareResponse.patientShareWithTax.toString() == "0.0")) {
setOnlineCheckInForAppointment();
}
@ -69,7 +69,7 @@ class _BookSuccessState extends State<BookSuccess> {
Widget build(BuildContext context) {
projectViewModel = Provider.of<ProjectViewModel>(context);
return AppScaffold(
appBarTitle: widget.docObject.doctorTitle + " " + widget.docObject.name,
appBarTitle: widget.docObject.doctorTitle! + " " + widget.docObject.name!,
isShowDecPage: false,
isShowAppBar: true,
showNewAppBarTitle: true,
@ -82,15 +82,15 @@ class _BookSuccessState extends State<BookSuccess> {
children: <Widget>[
DoctorHeader(
headerModel: HeaderModel(
widget.docObject.name,
widget.docObject.doctorID,
widget.docObject.doctorImageURL,
widget.docObject.speciality,
widget.docObject.name!,
widget.docObject.doctorID!,
widget.docObject.doctorImageURL!,
widget.docObject.speciality!,
"",
widget.docObject.projectName,
widget.docObject.projectName!,
null,
null,
widget.docObject.nationalityFlagURL,
widget.docObject.nationalityFlagURL!,
widget.docObject.doctorRate,
null,
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) {
case 0:
return Container();
@ -266,7 +266,7 @@ class _BookSuccessState extends State<BookSuccess> {
appo.isLiveCareAppointment = widget.patientShareResponse.isLiveCareAppointment;
appo.doctorID = widget.patientShareResponse.doctorID;
appo.appointmentDate = widget.patientShareResponse.appointmentDate;
if (appo.isLiveCareAppointment)
if (appo.isLiveCareAppointment!)
insertLiveCareVIDARequest(appo);
else
navigateToHome(context);
@ -294,13 +294,13 @@ class _BookSuccessState extends State<BookSuccess> {
appo.serviceID = widget.patientShareResponse.serviceID;
appo.isLiveCareAppointment = widget.patientShareResponse.isLiveCareAppointment;
appo.doctorID = widget.patientShareResponse.doctorID;
if (appo.isLiveCareAppointment) {
if (appo.isLiveCareAppointment!) {
navigateToHome(context);
} else {
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)),
),
),
@ -311,7 +311,7 @@ class _BookSuccessState extends State<BookSuccess> {
);
}
Widget getNextActionWidget() {
Widget? getNextActionWidget() {
switch (widget.patientShareResponse.nextAction) {
case 0:
return Container();
@ -336,7 +336,7 @@ class _BookSuccessState extends State<BookSuccess> {
}
}
String getNextAction() {
String? getNextAction() {
switch (widget.patientShareResponse.nextAction) {
case 0:
return 'No Action';
@ -426,7 +426,7 @@ class _BookSuccessState extends State<BookSuccess> {
setOnlineCheckInForAppointment() {
DoctorsListService service = new DoctorsListService();
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();
appo.clinicID = widget.docObject.clinicID;
appo.projectID = widget.docObject.projectID;
@ -447,11 +447,11 @@ class _BookSuccessState extends State<BookSuccess> {
confirmAppointment(AppoitmentAllHistoryResultList appo) {
DoctorsListService service = new DoctorsListService();
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);
if (res['MessageStatus'] == 1) {
AppToast.showSuccessToast(message: res['ErrorEndUserMessage']);
if (appo.isLiveCareAppointment) {
if (appo.isLiveCareAppointment!) {
insertLiveCareVIDARequest(appo);
} else {
navigateToHome(context);
@ -470,8 +470,8 @@ class _BookSuccessState extends State<BookSuccess> {
DoctorsListService service = new DoctorsListService();
GifLoaderDialogUtils.showMyDialog(context);
service
.insertVIDARequest(appo.appointmentNo, appo.clinicID, appo.projectID, appo.serviceID, appo.doctorID, appo.appointmentDate,
Utils.getAppointmentTransID(appo.projectID, appo.clinicID, appo.appointmentNo), context)
.insertVIDARequest(appo.appointmentNo!, appo.clinicID!, appo.projectID!, appo.serviceID!, appo.doctorID!, appo.appointmentDate!,
Utils.getAppointmentTransID(appo.projectID!, appo.clinicID!, appo.appointmentNo!), context)
.then((res) {
GifLoaderDialogUtils.hideDialog(context);
if (res['MessageStatus'] == 1) {
@ -550,13 +550,13 @@ class _BookSuccessState extends State<BookSuccess> {
context,
FadePage(
page: PaymentMethod(
onSelectedMethod: (String metohd, [String selectedInstallmentPlan]) {
onSelectedMethod: (String metohd, [String? selectedInstallmentPlan]) {
setState(() {});
},
patientShare: widget.patientShareResponse.patientShareWithTax)))
.then((value) {
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');
}
});
@ -569,18 +569,18 @@ class _BookSuccessState extends State<BookSuccess> {
widget.browser.openPaymentBrowser(
amount,
"Appointment check in",
Utils.getAppointmentTransID(appo.projectID, appo.clinicID, appo.appointmentNo),
Utils.getAppointmentTransID(appo.projectID!, appo.clinicID!, appo.appointmentNo!),
appo.projectID.toString(),
authenticatedUser.emailAddress,
authenticatedUser.emailAddress!,
paymentMethod[0],
authenticatedUser.patientType,
authenticatedUser.firstName,
authenticatedUser.firstName!,
authenticatedUser.patientID,
authenticatedUser,
widget.browser,
widget.patientShareResponse.isLiveCareAppointment,
widget.patientShareResponse.isLiveCareAppointment!,
"2",
widget.patientShareResponse.isLiveCareAppointment ? widget.patientShareResponse.clinicID.toString() : "",
widget.patientShareResponse.isLiveCareAppointment! ? widget.patientShareResponse.clinicID.toString() : "",
context,
widget.patientShareResponse.appointmentDate,
widget.patientShareResponse.appointmentNo,
@ -623,7 +623,7 @@ class _BookSuccessState extends State<BookSuccess> {
onBrowserExit(AppoitmentAllHistoryResultList appo, bool isPaymentMade) {
try {
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") {
// updateTamaraRequestStatus("success", "14", Utils.getAppointmentTransID(appo.projectID, appo.clinicID, appo.appointmentNo), tamaraOrderID, num.parse(selectedInstallments), appo);
// } else {
@ -644,10 +644,10 @@ class _BookSuccessState extends State<BookSuccess> {
service.getTamaraPaymentStatus(orderID).then((res) {
GifLoaderDialogUtils.hideDialog(context);
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 {
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) {
GifLoaderDialogUtils.hideDialog(context);
@ -671,7 +671,7 @@ class _BookSuccessState extends State<BookSuccess> {
DoctorsListService service = new DoctorsListService();
service.updateTamaraRequestStatus(responseMessage, status, clientRequestID, tamaraOrderID, selectedInstallments).then((res) {
GifLoaderDialogUtils.hideDialog(context);
if (tamaraPaymentStatus.toLowerCase() == "approved") {
if (tamaraPaymentStatus!.toLowerCase() == "approved") {
markAppointmentForTamara(appo);
addAdvancedNumberRequestTamara("Tamara-Advance-0000", tamaraOrderID, appo.appointmentNo.toString(), appo);
}
@ -688,9 +688,9 @@ class _BookSuccessState extends State<BookSuccess> {
markAppointmentForTamara(AppoitmentAllHistoryResultList appo) {
GifLoaderDialogUtils.showMyDialog(context);
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);
if (appo.isLiveCareAppointment)
if (appo.isLiveCareAppointment!)
insertLiveCareVIDARequest(appo);
else
getAppoQR(context);
@ -704,9 +704,9 @@ class _BookSuccessState extends State<BookSuccess> {
autoGenerateInvoiceTamara(AppoitmentAllHistoryResultList appo) {
GifLoaderDialogUtils.showMyDialog(context);
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);
if (appo.isLiveCareAppointment)
if (appo.isLiveCareAppointment!)
insertLiveCareVIDARequest(appo);
else
getAppoQR(context);
@ -721,10 +721,10 @@ class _BookSuccessState extends State<BookSuccess> {
String txn_ref;
num amount;
String payment_method;
final currency = projectViewModel.user.outSA == 0 ? "sar" : 'aed';
final currency = projectViewModel.user!.outSA == 0 ? "sar" : 'aed';
GifLoaderDialogUtils.showMyDialog(context);
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'];
if (paymentInfo == 'Success') {
txn_ref = res['Merchant_Reference'];
@ -755,7 +755,7 @@ class _BookSuccessState extends State<BookSuccess> {
getApplePayAPQ(AppoitmentAllHistoryResultList appo) {
GifLoaderDialogUtils.showMyDialog(context);
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);
String paymentInfo = res['Response_Message'];
@ -776,7 +776,7 @@ class _BookSuccessState extends State<BookSuccess> {
String paymentReference = res['Fort_id'].toString();
service.createAdvancePayment(appo, appo.projectID.toString(), res['Amount'], res['Fort_id'], res['PaymentMethod'], context).then((res) {
addAdvancedNumberRequest(
Utils.isVidaPlusProject(projectViewModel, appo.projectID)
Utils.isVidaPlusProject(projectViewModel, appo.projectID!)
? res['OnlineCheckInAppointments'][0]['AdvanceNumber_VP'].toString()
: res['OnlineCheckInAppointments'][0]['AdvanceNumber'].toString(),
paymentReference,
@ -792,7 +792,7 @@ class _BookSuccessState extends State<BookSuccess> {
addAdvancedNumberRequest(String advanceNumber, String paymentReference, String appointmentID, AppoitmentAllHistoryResultList appo) {
DoctorsListService service = new DoctorsListService();
service.addAdvancedNumberRequest(advanceNumber, paymentReference, appointmentID, context).then((res) {
if (appo.isLiveCareAppointment) {
if (appo.isLiveCareAppointment!) {
insertLiveCareVIDARequest(appo);
} else {
getAppoQR(context);
@ -960,7 +960,8 @@ class _BookSuccessState extends State<BookSuccess> {
appointment.doctorTitle = "Dr. ";
appointment.doctorNameObj = widget.patientShareResponse.doctorNameObj;
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.projectID = widget.patientShareResponse.projectID;
appointment.appointmentDate = widget.patientShareResponse.appointmentDate;

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

@ -27,7 +27,7 @@ class DentalComplaints extends StatefulWidget {
Function onSelectedMethod;
bool isDoctorNameSearch;
DentalComplaints({@required this.searchInfo, this.onSelectedMethod, this.isDoctorNameSearch = false});
DentalComplaints({required this.searchInfo, required this.onSelectedMethod, this.isDoctorNameSearch = false});
@override
_DentalComplaintsState createState() => _DentalComplaintsState();
@ -43,10 +43,10 @@ class _DentalComplaintsState extends State<DentalComplaints> {
List<DoctorList> doctorsList = [];
DentalProceduresModel dentalProceduresModel;
List<PatientDoctorAppointmentList> patientDoctorAppointmentListHospital =[];
late DentalProceduresModel dentalProceduresModel;
List<PatientDoctorAppointmentList> patientDoctorAppointmentListHospital = [];
ProjectViewModel projectViewModel;
late ProjectViewModel projectViewModel;
@override
void initState() {
@ -75,10 +75,12 @@ class _DentalComplaintsState extends State<DentalComplaints> {
languageID: languageID,
isDoctorNameSearch: widget.isDoctorNameSearch,
onSelectedMethod: widget.onSelectedMethod,
)..logAnalytics = (){
final info = widget.searchInfo;
locator<GAnalytics>().appointment.book_appointment_chief_complaints(appointment_type: 'regular', hospital: info.hospital, clinic: info.clinic, treatment: complaintsList[index]);
},
)..logAnalytics = () {
final info = widget.searchInfo;
locator<GAnalytics>()
.appointment
.book_appointment_chief_complaints(appointment_type: 'regular', hospital: info.hospital, clinic: info.clinic, treatment: complaintsList[index]);
},
);
},
separatorBuilder: (BuildContext context, int index) {
@ -108,11 +110,11 @@ class _DentalComplaintsState extends State<DentalComplaints> {
patientDoctorAppointmentListHospital.length,
(index) => AppExpandableNotifier(
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(
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: patientDoctorAppointmentListHospital[index].patientDoctorAppointmentList.map((doctor) {
children: patientDoctorAppointmentListHospital[index].patientDoctorAppointmentList!.map((doctor) {
return DoctorView(
doctor: doctor,
isLiveCareAppointment: false,
@ -135,7 +137,7 @@ class _DentalComplaintsState extends State<DentalComplaints> {
checkIfHasDentalPlan() {
DoctorsListService service = new DoctorsListService();
GifLoaderDialogUtils.showMyDialog(context);
service.checkIfHasDentalPlan(widget.searchInfo.ProjectID, context).then((res) {
service.checkIfHasDentalPlan(widget.searchInfo.ProjectID!, context).then((res) {
GifLoaderDialogUtils.hideDialog(context);
if (res['MessageStatus'] == 1) {
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: [
Container(
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(
margin: EdgeInsets.all(12.0),
@ -211,12 +213,13 @@ class _DentalComplaintsState extends State<DentalComplaints> {
GifLoaderDialogUtils.showMyDialog(context);
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);
if (res['MessageStatus'] == 1) {
dentalProceduresModel = DentalProceduresModel.fromJson(res);
dentalProceduresModel.listIsPatientHasOnGoingEstimation.forEach((procedure) {
appoTime += procedure.neededTime;
dentalProceduresModel = DentalProceduresModel.fromJson(res as Map<String, dynamic>);
//Changed by Aamir added Map into string dynamic
dentalProceduresModel.listIsPatientHasOnGoingEstimation!.forEach((procedure) {
appoTime += procedure.neededTime!;
});
setState(() {
hasDentalPlan = true;
@ -236,7 +239,7 @@ class _DentalComplaintsState extends State<DentalComplaints> {
.toList();
if (doctorByHospital.length != 0) {
patientDoctorAppointmentListHospital[patientDoctorAppointmentListHospital.indexOf(doctorByHospital[0])].patientDoctorAppointmentList.add(element);
patientDoctorAppointmentListHospital[patientDoctorAppointmentListHospital.indexOf(doctorByHospital[0])].patientDoctorAppointmentList!.add(element);
} else {
patientDoctorAppointmentListHospital
.add(PatientDoctorAppointmentList(filterName: element.projectName, distanceInKMs: element.projectDistanceInKiloMeters.toString(), patientDoctorAppointment: element));
@ -257,7 +260,7 @@ class _DentalComplaintsState extends State<DentalComplaints> {
GifLoaderDialogUtils.showMyDialog(context);
getLanguageID();
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);
if (res['MessageStatus'] == 1) {
setState(() {

@ -26,20 +26,20 @@ class BookReminderPage extends StatefulWidget {
String appoDateFormatted;
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
_BookReminderPageState createState() => _BookReminderPageState();
}
class _BookReminderPageState extends State<BookReminderPage> {
MyInAppBrowser browser;
late MyInAppBrowser browser;
final ChromeSafariBrowser chromeBrowser = new MyChromeSafariBrowser(new MyInAppBrowser());
String selectedTime;
String? selectedTime;
bool isSuccessShow = true;
@override
@ -55,13 +55,13 @@ class _BookReminderPageState extends State<BookReminderPage> {
});
}
ProjectViewModel projectViewModel;
late ProjectViewModel projectViewModel;
@override
Widget build(BuildContext context) {
projectViewModel = Provider.of<ProjectViewModel>(context);
return AppScaffold(
appBarTitle: widget.docObject.doctorTitle + " " + widget.docObject.name,
appBarTitle: widget.docObject.doctorTitle! + " " + widget.docObject.name!,
isShowDecPage: false,
isShowAppBar: true,
showNewAppBarTitle: true,
@ -73,18 +73,18 @@ class _BookReminderPageState extends State<BookReminderPage> {
children: <Widget>[
DoctorHeader(
headerModel: HeaderModel(
widget.docObject.name,
widget.docObject.doctorID,
widget.docObject.doctorImageURL,
widget.docObject.speciality,
widget.docObject.name!,
widget.docObject.doctorID!,
widget.docObject.doctorImageURL!,
widget.docObject.speciality!,
"",
widget.docObject.projectName,
widget.docObject.projectName!,
null,
null,
widget.docObject.nationalityFlagURL,
widget.docObject.doctorRate,
widget.docObject.nationalityFlagURL!,
widget.docObject.doctorRate!,
null,
widget.docObject.noOfPatientsRate,
widget.docObject.noOfPatientsRate!,
"",
),
isNeedToShowButton: false,
@ -184,14 +184,14 @@ class _BookReminderPageState extends State<BookReminderPage> {
),
height: 45.0,
child: CustomTextButton(
backgroundColor: CustomColors.green,
elevation: 0,
backgroundColor: CustomColors.green,
elevation: 0,
onPressed: () async {
print(widget.patientShareResponse.appointmentNo);
showReminderDialog(
context,
widget.dateTime,
widget.docObject.name,
widget.dateTime!,
widget.docObject.name!,
widget.patientShareResponse.appointmentNo.toString(),
widget.appoDateFormatted,
widget.appoTimeFormatted,

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

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

@ -11,10 +11,10 @@ class CardCommon extends StatelessWidget {
final type;
const CardCommon(
{@required this.image,
@required this.text,
@required this.subText,
@required this.type});
{required this.image,
required this.text,
required this.subText,
required this.type});
@override
Widget build(BuildContext context) {
@ -25,7 +25,7 @@ class CardCommon extends StatelessWidget {
child: Container(
margin: EdgeInsets.fromLTRB(9.0, 9.0, 9.0, 9.0),
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),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,

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

@ -10,12 +10,12 @@ import 'package:flutter/material.dart';
// ignore: must_be_immutable
class DentalComplaintCard extends StatefulWidget {
final ListDentalChiefComplain listDentalChiefComplain;
VoidCallback logAnalytics;
late VoidCallback logAnalytics;
var languageID;
Function onSelectedMethod;
Function? onSelectedMethod;
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
_DentalComplaintCardState createState() => _DentalComplaintCardState();
@ -43,7 +43,7 @@ class _DentalComplaintCardState extends State<DentalComplaintCard> {
children: <Widget>[
Container(
child: Text(
widget.listDentalChiefComplain.name,
widget.listDentalChiefComplain.name!,
style: TextStyle(
fontSize: 16.0,
color: Colors.black,
@ -65,7 +65,7 @@ class _DentalComplaintCardState extends State<DentalComplaintCard> {
GifLoaderDialogUtils.showMyDialog(context);
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);
if (res['MessageStatus'] == 1) {
print(res['List_DentalDoctorChiefComplaintMapping']);
@ -83,7 +83,7 @@ class _DentalComplaintCardState extends State<DentalComplaintCard> {
.toList();
if (doctorByHospital.length != 0) {
_patientDoctorAppointmentListHospital[_patientDoctorAppointmentListHospital.indexOf(doctorByHospital[0])].patientDoctorAppointmentList.add(element);
_patientDoctorAppointmentListHospital[_patientDoctorAppointmentListHospital.indexOf(doctorByHospital[0])].patientDoctorAppointmentList!.add(element);
} else {
_patientDoctorAppointmentListHospital
.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/transitions/fade_page.dart';
import 'package:flutter/material.dart';
import 'package:flutter_rating_bar/flutter_rating_bar.dart';
import 'package:provider/provider.dart';
import 'package:rating_bar/rating_bar.dart';
import '../DoctorProfile.dart';
@ -28,19 +28,19 @@ class DoctorView extends StatelessWidget {
bool isObGyneAppointment;
bool isShowFlag;
bool isDoctorNameSearch;
OBGyneProcedureListResponse obGyneProcedureListResponse;
final VoidCallback onTap;
OBGyneProcedureListResponse? obGyneProcedureListResponse;
final VoidCallback? onTap;
DoctorView(
{@required this.doctor,
@required this.isLiveCareAppointment,
{required this.doctor,
required this.isLiveCareAppointment,
this.isObGyneAppointment = false,
this.isDoctorNameSearch = false,
this.isShowFlag = true,
this.onTap,
this.obGyneProcedureListResponse});
ProjectViewModel projectViewModel;
late ProjectViewModel projectViewModel;
@override
Widget build(BuildContext context) {
@ -53,7 +53,7 @@ class DoctorView extends StatelessWidget {
// if (doctor.clinicID == 17 && isDoctorNameSearch) {
// showDentalChiefComplaintsList(context);
// } else
if (isShowFlag) {
if (isShowFlag) {
getDoctorsProfile(context, doctor, isAppo: true);
}
(onTap ?? () {})(); // For log analytics of doctor click from book appointment
@ -83,7 +83,7 @@ class DoctorView extends StatelessWidget {
children: [
Expanded(
child: Text(
doctor.name,
doctor.name!,
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,
children: <Widget>[
LargeAvatar(
name: doctor.name,
url: doctor.doctorImageURL,
name: doctor.name!,
url: doctor.doctorImageURL!,
width: 48,
height: 48,
),
@ -109,11 +109,11 @@ class DoctorView extends StatelessWidget {
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisSize: MainAxisSize.min,
children: <Widget>[
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.speciality != null && doctor.speciality.length > 0)
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.speciality != null && doctor.speciality!.length > 0)
Text(
this.doctor.speciality[0].trim(),
this.doctor.speciality![0].trim(),
// getDoctorSpeciality(this.doctor.speciality).trim(),
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,
mainAxisSize: MainAxisSize.max,
children: <Widget>[
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,
//changed By Aamir
RatingBar(
initialRating: 3,
direction: Axis.horizontal,
allowHalfRating: true,
itemCount: 5,
itemSize: 20,
ignoreGestures: true,
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)
Icon(
Icons.arrow_forward,
@ -169,9 +188,14 @@ class DoctorView extends StatelessWidget {
searchInfo.hospital = selectedHospital;
searchInfo.clinic = selectedClinic;
showDraggableDialog(context, DentalComplaints(isDoctorNameSearch: true, onSelectedMethod: () {
Navigator.pop(context);
}, searchInfo: searchInfo));
showDraggableDialog(
context,
DentalComplaints(
isDoctorNameSearch: true,
onSelectedMethod: () {
Navigator.pop(context);
},
searchInfo: searchInfo));
}
String getDoctorSpeciality(List<String> docSpecial) {
@ -186,7 +210,7 @@ class DoctorView extends StatelessWidget {
GifLoaderDialogUtils.showMyDialog(context);
List<DoctorProfileList> docProfileList = [];
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);
if (res['MessageStatus'] == 1) {
if (res['DoctorProfileList'].length != 0) {
@ -230,7 +254,7 @@ class DoctorView extends StatelessWidget {
void next(BuildContext 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 {

@ -2,7 +2,7 @@ import 'package:flutter/material.dart';
import 'package:flutter_svg/flutter_svg.dart';
class TopCard extends StatelessWidget {
TopCard({@required this.image, @required this.isSVG});
TopCard({required this.image, required this.isSVG});
final String image;
final bool isSVG;
@ -21,9 +21,7 @@ class TopCard extends StatelessWidget {
height: 100.0,
padding: EdgeInsets.all(7.0),
width: MediaQuery.of(context).size.width * 0.45,
child: this.isSVG
? SvgPicture.asset(this.image)
: Image.asset(this.image),
child: this.isSVG ? 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,
{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 (await PermissionService.isCalendarPermissionEnabled()) {
_showReminderDialog(context, dateTime, doctorName, eventId, appoDateFormatted, appoTimeFormatted,
onSuccess: onSuccess, title: title, description: description, onMultiDateSuccess: onMultiDateSuccess);
onSuccess: onSuccess, title: title!, description: description!, onMultiDateSuccess: onMultiDateSuccess!);
} else {
Utils.showPermissionConsentDialog(context, TranslationBase.of(context).calendarPermission, () async {
if (await Permission.calendar.request().isGranted) {
_showReminderDialog(context, dateTime, doctorName, eventId, appoDateFormatted, appoTimeFormatted,
onSuccess: onSuccess, title: title, description: description, onMultiDateSuccess: onMultiDateSuccess);
onSuccess: onSuccess, title: title!, description: description!, onMultiDateSuccess: onMultiDateSuccess!);
}
});
}
} else {
if (await Permission.calendar.request().isGranted) {
_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();
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>(
context: context,
barrierDismissible: true, // user must tap button!
@ -57,23 +57,23 @@ Future<void> _showReminderDialog(BuildContext context, DateTime dateTime, String
String text = "";
if (i == 0) {
// Before 30 mints
dateTime = Jiffy(dateTime).subtract(minutes: 30).dateTime;
dateTime = Jiffy.parseFromDateTime(dateTime).subtract(minutes: 30).dateTime;
text = "30 minutes";
// dateTime.add(new Duration(minutes: -30));
} else if (i == 1) {
// Before 1 hour
// dateTime.add(new Duration(minutes: -60));
dateTime = Jiffy(dateTime).subtract(hours: 1).dateTime;
dateTime = Jiffy.parseFromDateTime(dateTime).subtract(hours: 1).dateTime;
text = "1 hours";
} else if (i == 2) {
// Before 1 hour and 30 mints
// 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";
} else if (i == 3) {
// Before 2 hours
// dateTime.add(new Duration(minutes: -120));
dateTime = Jiffy(dateTime).subtract(hours: 2).dateTime;
dateTime = Jiffy.parseFromDateTime(dateTime).subtract(hours: 2).dateTime;
text = "2 hours";
}
@ -100,7 +100,7 @@ Future<void> _showReminderDialog(BuildContext context, DateTime dateTime, String
}
class ReminderDialog extends StatefulWidget {
Function onClick;
Function? onClick;
ReminderDialog({this.onClick});
@ -164,9 +164,9 @@ class _ReminderDialogState extends State<ReminderDialog> {
Radio<int>(
value: 0,
groupValue: i,
onChanged: (int value) {
onChanged: (int? value) {
setState(() {
i = value;
i = value!;
});
},
),
@ -185,9 +185,9 @@ class _ReminderDialogState extends State<ReminderDialog> {
Radio<int>(
value: 1,
groupValue: i,
onChanged: (int value) {
onChanged: (int? value) {
setState(() {
i = value;
i = value!;
});
},
),
@ -206,9 +206,9 @@ class _ReminderDialogState extends State<ReminderDialog> {
Radio<int>(
value: 2,
groupValue: i,
onChanged: (int value) {
onChanged: (int? value) {
setState(() {
i = value;
i = value!;
});
},
),
@ -227,9 +227,9 @@ class _ReminderDialogState extends State<ReminderDialog> {
Radio<int>(
value: 3,
groupValue: i,
onChanged: (int value) {
onChanged: (int? value) {
setState(() {
i = value;
i = value!;
});
},
),
@ -247,7 +247,7 @@ class _ReminderDialogState extends State<ReminderDialog> {
DefaultButton(
TranslationBase.of(context).save,
() {
widget.onClick(i);
widget.onClick!(i);
Navigator.pop(context);
},
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,
[String procedureID, num testTypeEnum, num testProcedureEnum, ProjectViewModel projectViewModel]) async {
[String? procedureID, num? testTypeEnum, num? testProcedureEnum, required ProjectViewModel projectViewModel]) async {
Map<String, dynamic> request;
if (await this.sharedPref.getObject(USER_PROFILE) != null) {
@ -380,12 +380,12 @@ class DoctorsListService extends BaseService {
};
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;
if (procedureID.length == 1 && procedureID[0] == "1") {
request["InitialSlotDuration"] = 90;
} else {
request["InitialSlotDuration"] = projectViewModel.laserSelectionDuration;
request["InitialSlotDuration"] = projectViewModel!.laserSelectionDuration!;
}
}

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

@ -92,12 +92,12 @@ class DoctorHeader extends StatelessWidget {
children: [
if (headerModel.date != null)
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),
),
if (headerModel.time != null)
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),
),
if (headerModel?.nationalityFlagURL != null)

Loading…
Cancel
Save