dev_v3.13.6_voipcall
devamirsaleemahmad 12 months ago
parent 4231c85055
commit 23b7d85911

@ -1,5 +1,5 @@
class HMCProjectListModel {
int projectID;
int? projectID;
HMCProjectListModel({this.projectID});

@ -9,7 +9,7 @@ import 'package:diplomaticquarterapp/core/service/base_service.dart';
import 'package:diplomaticquarterapp/models/Authentication/authenticated_user.dart';
class LabsService extends BaseService {
List<PatientLabOrders> patientLabOrdersList =[];
List<PatientLabOrders> patientLabOrdersList = [];
String labReportPDF = "";
@ -30,9 +30,9 @@ class LabsService extends BaseService {
RequestPatientLabSpecialResult _requestPatientLabSpecialResult = RequestPatientLabSpecialResult();
List<PatientLabSpecialResult> patientLabSpecialResult =[];
List<LabResult> labResultList =[];
List<LabOrderResult> labOrdersResultsList =[];
List<PatientLabSpecialResult> patientLabSpecialResult = [];
List<LabResult> labResultList = [];
List<LabOrderResult> labOrdersResultsList = [];
Future getLaboratoryResult({String? projectID, int? clinicID, String? invoiceNo, String? orderNo, String? setupID, bool? isVidaPlus}) async {
hasError = false;
@ -177,14 +177,14 @@ class LabsService extends BaseService {
return Future.value(localRes);
}
Future getPatientLabOrdersResults({PatientLabOrders? patientLabOrder, String? procedure}) async {
Future getPatientLabOrdersResults({PatientLabOrders? patientLabOrder, String? procedure, bool isVidaPlus = false}) async {
hasError = false;
Map<String, dynamic> body = Map();
body['InvoiceNo'] = "0";
body['InvoiceNo_VP'] = patientLabOrder!.invoiceNo;
body['OrderNo'] = patientLabOrder.orderNo;
body['InvoiceNo_VP'] = isVidaPlus ? patientLabOrder!.invoiceNo : "0";
body['InvoiceNo'] = isVidaPlus ? "0" : patientLabOrder!.invoiceNo;
body['OrderNo'] = patientLabOrder!.orderNo;
body['isDentalAllowedBackend'] = false;
body['SetupID'] = patientLabOrder.setupID;
body['SetupID'] = patientLabOrder!.setupID;
body['ProjectID'] = patientLabOrder.projectID;
body['ClinicID'] = patientLabOrder.clinicID;
body['Procedure'] = procedure;

@ -22,8 +22,8 @@ class LabsViewModel extends BaseViewModel {
String get labReportPDF => _labsService.labReportPDF;
List<PatientLabOrdersList> _patientLabOrdersListClinic =[];
List<PatientLabOrdersList> _patientLabOrdersListHospital =[];
List<PatientLabOrdersList> _patientLabOrdersListClinic = [];
List<PatientLabOrdersList> _patientLabOrdersListHospital = [];
List<PatientLabOrdersList> get patientLabOrdersList => filterType == FilterType.Clinic ? _patientLabOrdersListClinic : _patientLabOrdersListHospital;
@ -48,7 +48,7 @@ class LabsViewModel extends BaseViewModel {
List<PatientLabOrdersList> patientLabOrdersHospital = _patientLabOrdersListHospital
.where(
(elementClinic) => elementClinic.filterName == element.projectName,
)
)
.toList();
if (patientLabOrdersHospital.length != 0) {
@ -72,17 +72,11 @@ class LabsViewModel extends BaseViewModel {
List<LabResult> get labResultList => _labsService.labResultList;
List<LabResultList> labResultLists =[];
List<LabResultList> labResultLists = [];
getLaboratoryResult({required String projectID, required int clinicID, required String invoiceNo, required String orderNo, required String setupID, required bool isVidaPlus}) async {
getLaboratoryResult({String projectID, int clinicID, String invoiceNo, String orderNo, String setupID, bool isVidaPlus}) async {
setState(ViewState.Busy);
await _labsService.getLaboratoryResult(invoiceNo: invoiceNo,
orderNo: orderNo,
projectID: projectID,
clinicID: clinicID,
setupID: setupID,
isVidaPlus: isVidaPlus);
await _labsService.getLaboratoryResult(invoiceNo: invoiceNo, orderNo: orderNo, projectID: projectID, clinicID: clinicID, setupID: setupID, isVidaPlus: isVidaPlus);
if (_labsService.hasError) {
error = _labsService.error!;
setState(ViewState.Error);
@ -115,9 +109,13 @@ class LabsViewModel extends BaseViewModel {
}
}
getPatientLabOrdersResults({PatientLabOrders patientLabOrder, String procedure, bool isVidaPlus}) async {
getPatientLabOrdersResults({PatientLabOrders? patientLabOrder, String? procedure, bool? isVidaPlus}) async {
setState(ViewState.Busy);
await _labsService.getPatientLabOrdersResults(patientLabOrder: patientLabOrder, procedure: procedure, isVidaPlus: isVidaPlus);
await _labsService.getPatientLabOrdersResults(
patientLabOrder: patientLabOrder,
procedure: procedure,
isVidaPlus: isVidaPlus!,
);
if (_labsService.hasError) {
error = _labsService.error!;
setState(ViewState.Error);
@ -136,19 +134,20 @@ class LabsViewModel extends BaseViewModel {
_labsService.labOrdersResultsList.forEach((element) {
try {
timeSeries.add(new TimeSeriesSales2(DateUtil.convertStringToDate(element.verifiedOnDateTime), double.parse(element.resultValue)));
timeSeries.add(new TimeSeriesSales2(DateUtil.convertStringToDate(element.verifiedOnDateTime!), double.parse(element.resultValue!)));
} catch (e) {}
});
setState(ViewState.Idle);
}
}
sendLabReportEmail({PatientLabOrders? patientLabOrder, String? mes, AuthenticatedUser? userObj, required bool isVidaPlus, bool isDownload = false}) async {
sendLabReportEmail({PatientLabOrders? patientLabOrder, String? mes, AuthenticatedUser? userObj, required bool isVidaPlus, bool isDownload = false}) async {
await _labsService.sendLabReportEmail(patientLabOrder: patientLabOrder, userObj: userObj, isVidaPlus: isVidaPlus, isDownload: isDownload);
if (_labsService.hasError) {
error = _labsService.error!;
} else {
if (isDownload) {} else {
if (isDownload) {
} else {
AppToast.showSuccessToast(message: mes!);
}
}

@ -22,6 +22,7 @@ import 'package:diplomaticquarterapp/widgets/dragable_sheet.dart';
import 'package:diplomaticquarterapp/widgets/in_app_browser/InAppBrowser.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:flutter/material.dart';
import 'package:provider/provider.dart';
class AnicllaryOrdersDetails extends StatefulWidget {
final dynamic appoNo;
@ -209,7 +210,7 @@ class _AnicllaryOrdersState extends State<AnicllaryOrdersDetails> with SingleTic
),
mWidth(3),
Text(
projectViewModel.user.firstName + " " + projectViewModel.user.lastName,
projectViewModel.user.firstName! + " " + projectViewModel.user.lastName!,
style: TextStyle(
fontWeight: FontWeight.w600,
fontSize: 12,
@ -368,9 +369,28 @@ class _AnicllaryOrdersState extends State<AnicllaryOrdersDetails> with SingleTic
);
}
// Widget getAncillaryDetails(AnciallryOrdersViewModel model) {
// Map newMap = groupBy(model.ancillaryListsDetails[0].ancillaryOrderProcDetailsList!, (obj) => obj.procedureCategoryName);
// return Padding(padding: EdgeInsets.only(top: 0, bottom: 200), child: getHeaderDetails(newMap));
// }
// Changed By Aamir
Widget getAncillaryDetails(AnciallryOrdersViewModel model) {
Map newMap = groupBy(model.ancillaryListsDetails[0].ancillaryOrderProcDetailsList!, (obj) => obj.procedureCategoryName);
return Padding(padding: EdgeInsets.only(top: 0, bottom: 200), child: getHeaderDetails(newMap));
Map<String, List<Object>> newMap = {};
// Grouping the list manually by the 'procedureCategoryName' key
model.ancillaryListsDetails[0].ancillaryOrderProcDetailsList!.forEach((obj) {
String key = obj.procedureCategoryName!;
if (newMap.containsKey(key)) {
newMap[key]!.add(obj);
} else {
newMap[key] = [obj];
}
});
return Padding(
padding: EdgeInsets.only(top: 0, bottom: 200),
child: getHeaderDetails(newMap),
);
}
Widget getHeaderDetails(newMap) {
@ -639,15 +659,9 @@ class _AnicllaryOrdersState extends State<AnicllaryOrdersDetails> with SingleTic
// selectedProcList.forEach((element) {
// ancillaryOrdersProcedureList.add(new AncillaryOrdersProcedureList(procedureID: num.parse(element.procedureID), procedureDescription: element.procedureName));
// });
service.HIS_createAdvancePayment(appo, widget.projectID.toString(), res['Amount'], res['Fort_id'], res['PaymentMethod'], projectViewModel.user.patientType,
projectViewModel.user.firstName + " " + projectViewModel.user.lastName, projectViewModel.user.patientID, localContext,
isAncillaryOrder: true)
// List<AncillaryOrdersProcedureList> ancillaryOrdersProcedureList = [];
// selectedProcList.forEach((element) {
// ancillaryOrdersProcedureList.add(new AncillaryOrdersProcedureList(procedureID: num.parse(element.procedureID), procedureDescription: element.procedureName));
// });
service.HIS_createAdvancePayment(appo, widget.projectID.toString(), res['Amount'], res['Fort_id'], res['PaymentMethod'], projectViewModel.user.patientType,
projectViewModel.user.firstName + " " + projectViewModel.user.lastName, projectViewModel.user.patientID, localContext,
projectViewModel.user.firstName! + " " + projectViewModel.user.lastName!, projectViewModel.user.patientID, localContext,
isAncillaryOrder: true)
.then((res) {
addAdvancedNumberRequest(
@ -725,7 +739,7 @@ class _AnicllaryOrdersState extends State<AnicllaryOrdersDetails> with SingleTic
addToSelectedProcedures(AnciallryOrdersViewModel model) {
if (model.ancillaryListsDetails.isNotEmpty) {
selectedProcList.clear();
model.ancillaryListsDetails[0].ancillaryOrderProcDetailsList.forEach((element) {
model.ancillaryListsDetails[0].ancillaryOrderProcDetailsList!.forEach((element) {
if (!isProcedureDisabled(element)) {
selectedProcList.add(element);
}

@ -31,11 +31,11 @@ import 'package:flutter_svg/flutter_svg.dart';
class QRCode extends StatefulWidget {
late PatientShareResponse? patientShareResponse;
late AppoitmentAllHistoryResultList? appointment;
late String? appoQR;
late String? appoQR;
AuthenticatedUser? authUser;
AppSharedPreferences sharedPref = AppSharedPreferences();
QRCode({required this.patientShareResponse, required this.appoQR, this.appointment});
QRCode({required this.patientShareResponse, required this.appoQR, this.appointment});
@override
_QRCodeState createState() => _QRCodeState();
@ -79,10 +79,10 @@ class _QRCodeState extends State<QRCode> {
}
startQRCodeScan() async {
String onlineCheckInQRCode = (await BarcodeScanner.scan())?.rawContent;
String onlineCheckInQRCode = (await BarcodeScanner.scan().then((value) => value.rawContent));
if (onlineCheckInQRCode != "") {
sendNfcCheckInRequest(onlineCheckInQRCode);
locator<GAnalytics>().todoList.to_do_list_nfc(widget.appointment);
locator<GAnalytics>().todoList.to_do_list_nfc(widget.appointment!);
} else {}
}
@ -268,9 +268,16 @@ class _QRCodeState extends State<QRCode> {
okFunction: () {
GifLoaderDialogUtils.showMyDialog(context);
service
.sendAppointmentQREmail(widget.authUser!.emailAddress!, widget.patientShareResponse!.appointmentDate!, widget.patientShareResponse!.appointmentNo!.toString(),
.sendAppointmentQREmail(
widget.authUser!.emailAddress!,
widget.patientShareResponse!.appointmentDate!,
widget.patientShareResponse!.appointmentNo!.toString(),
//Changed By Aamir
widget.patientShareResponse!.doctorNameObj, widget.patientShareResponse!.projectName, widget.appoQR!, getDoctorSpeciality(widget.patientShareResponse!.doctorSpeciality as List<String>), context)
widget.patientShareResponse!.doctorNameObj,
widget.patientShareResponse!.projectName,
widget.appoQR!,
getDoctorSpeciality(widget.patientShareResponse!.doctorSpeciality as List<String>),
context)
.then((res) {
GifLoaderDialogUtils.hideDialog(context);
ConfirmDialog.closeAlertDialog(context);

@ -265,7 +265,7 @@ class _CovidPaymentSummaryState extends State<CovidPaymentSummary> {
MyInAppBrowser.errorURLS.forEach((element) {
if (url.contains(element)) {
if (widget.browser.isOpened()) widget.browser.close();
if (widget.browser!.isOpened()) widget.browser!.close();
MyInAppBrowser.isPaymentDone = false;
return;
}
@ -276,7 +276,7 @@ class _CovidPaymentSummaryState extends State<CovidPaymentSummary> {
print("onBrowserExit Called!!!!");
try {
if (widget.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(widget.selectedInstallmentPlan), appo);
// } else {

@ -371,7 +371,7 @@ class _MyAppointmentsState extends State<MyAppointments> with SingleTickerProvid
}),
isInOutPatient: _appointmentResult.isInOutPatient,
name: _appointmentResult.doctorTitle! + " " + _appointmentResult.doctorNameObj!,
projectID: _appointmentResult.projectID,
projectID: _appointmentResult.projectID!,
// billNo: _appointmentResult.invoiceNo,
profileUrl: _appointmentResult.doctorImageURL,
subName: _isSortByClinic ? _appointmentResult.projectName : _appointmentResult.clinicName,

@ -73,11 +73,9 @@ class _AppointmentActionsState extends State<AppointmentActions> {
padding: EdgeInsets.all(21),
shrinkWrap: true,
itemBuilder: (context, index) {
// bool shouldEnable = ((widget.appo.clinicID == 17 || widget.appo.clinicID == 47) || (widget.appo.isLiveCareAppointment && appoButtonsList[index].caller == "askDoc") || appoButtonsList[index].caller == "openReschedule");
bool shouldEnable = (((widget.appo.clinicID == 17 || widget.appo.clinicID == 47) && appoButtonsList[index].caller == "openReschedule") || (widget.appo.isLiveCareAppointment! && appoButtonsList[index].caller == "askDoc"));
bool shouldEnable = (((widget.appo.clinicID == 17 || widget.appo.clinicID == 47) && appoButtonsList[index].caller == "openReschedule") ||
(widget.appo.isLiveCareAppointment && appoButtonsList[index].caller == "askDoc") ||
(Utils.isVidaPlusProject(projectViewModel, widget.appo.projectID) &&
(widget.appo.isLiveCareAppointment! && appoButtonsList[index].caller == "askDoc") ||
(Utils.isVidaPlusProject(projectViewModel, widget.appo.projectID!) &&
widget.appo.clinicID == 10 &&
(appoButtonsList[index].caller == "prescriptions" || appoButtonsList[index].caller == "radiology" || appoButtonsList[index].caller == "labResult")));
return InkWell(
@ -158,12 +156,12 @@ class _AppointmentActionsState extends State<AppointmentActions> {
locator<GAnalytics>().appointment.appointment_detail_action(appointment: widget.appo, action: 'survey');
break;
case "Insurance":
navigateToInsuranceApprovals(widget.appo.appointmentNo);
navigateToInsuranceApprovals(widget.appo.appointmentNo!);
locator<GAnalytics>().appointment.appointment_detail_action(appointment: widget.appo, action: 'insurance');
break;
case "VitalSigns":
navigateToVitalSigns(widget.appo.appointmentNo, widget.appo.projectID);
navigateToVitalSigns(widget.appo.appointmentNo!, widget.appo.projectID!);
locator<GAnalytics>().appointment.appointment_detail_action(appointment: widget.appo, action: 'vital sign');
break;

@ -56,9 +56,9 @@ class ToDo extends StatefulWidget {
bool isShowAppBar = true;
Function()? onBackClick;
bool isFromMyAppointments;
AppoitmentAllHistoryResultList appointment;
AppoitmentAllHistoryResultList? appointment;
ToDo({@required this.isShowAppBar, this.onBackClick, this.isFromMyAppointments = false, this.appointment});
ToDo({required this.isShowAppBar, this.onBackClick, this.isFromMyAppointments = false, this.appointment});
@override
_ToDoState createState() => _ToDoState();
@ -804,7 +804,7 @@ class _ToDoState extends State<ToDo> with SingleTickerProviderStateMixin {
List<PatientDoctorAppointmentList> doctorByHospital = _patientDoctorAppointmentListHospital.where((elementClinic) => elementClinic.filterName == element.projectName).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));
@ -857,7 +857,7 @@ class _ToDoState extends State<ToDo> with SingleTickerProviderStateMixin {
}
dataLoaded = true;
if(widget.isFromMyAppointments) {
getPatientShare(context, widget.appointment);
getPatientShare(context, widget.appointment!);
}
});
} else {

@ -496,7 +496,7 @@ class _SendFeedbackPageState extends State<SendFeedbackPage> {
appoList.add(new AppoitmentAllHistoryResultList.fromJson(v));
});
setState(() {
appointHistory = null;
appointHistory = AppoitmentAllHistoryResultList();
isShowListAppointHistory = true;
});
} else {}
@ -519,6 +519,21 @@ class _SendFeedbackPageState extends State<SendFeedbackPage> {
return;
}
openSpeechReco() async {
new RoboSearch(context: context).showAlertDialog(context);
_currentLocaleId = TranslationBase.of(AppGlobal.context).locale.languageCode;
// bool available = await speech.initialize(onStatus: statusListener, onError: errorListener);
// if (available) {
// speech.listen(
// onResult: resultListener,
// listenMode: stt.ListenMode.confirmation,
// localeId: _currentLocaleId == 'en' ? 'en-US' : 'ar-SA',
// );
// } else {
// print("The user has denied the use of speech recognition.");
// }
}
// openSpeechReco() async {
// new RoboSearch(context: context).showAlertDialog(context);
// _currentLocaleId = TranslationBase.of(AppGlobal.context).locale.languageCode;

@ -25,7 +25,7 @@ import 'package:provider/provider.dart';
class HomePageFragment2 extends StatefulWidget {
DashboardViewModel model;
Function? onPharmacyClick, onLoginClick, onMedicalFileClick;
VoidCallback? onPharmacyClick, onLoginClick, onMedicalFileClick;
HomePageFragment2(this.model, {this.onLoginClick, this.onPharmacyClick, this.onMedicalFileClick});
@ -51,15 +51,15 @@ class _HomePageFragment2State extends State<HomePageFragment2> {
initialiseHmgServices(bool isLogin) {
hmgServices.clear();
hmgServices.add(new HmgServices(0, TranslationBase.of(context).book, TranslationBase.of(context).appointmentLabel, "assets/images/new/book appointment.svg", isLogin));
hmgServices.add(new HmgServices(1, TranslationBase.of(context).liveCare, TranslationBase.of(context).onlineConsulting, "assets/images/new/Live_Care.svg", isLogin));
hmgServices.add(new HmgServices(2, TranslationBase.of(context).emergencyTitle, TranslationBase.of(context).emergencySubtitle, "assets/images/new/emergency.svg", isLogin));
hmgServices.add(new HmgServices(3, TranslationBase.of(context).hhcHome, TranslationBase.of(context).healthCare, "assets/images/new/HHC.svg", isLogin));
hmgServices.add(new HmgServices(4, TranslationBase.of(context).checkup, TranslationBase.of(context).comprehensive, "assets/images/new/comprehensive_checkup.svg", isLogin));
hmgServices.add(new HmgServices(5, TranslationBase.of(context).online, TranslationBase.of(context).payment, "assets/images/new/paymentMethods.png", isLogin));
hmgServices.add(new HmgServices(6, TranslationBase.of(context).ereferralTitle, TranslationBase.of(context).ereferralSubtitle, "assets/images/new/E_Referral.svg", isLogin));
hmgServices.add(new HmgServices(7, TranslationBase.of(context).covidTest, TranslationBase.of(context).driveThru, "assets/images/new/CoronaIcon.svg", isLogin));
hmgServices.add(new HmgServices(8, TranslationBase.of(context).connectTitle, TranslationBase.of(context).connectSubtitle, "assets/images/new/reach_us.svg", isLogin));
hmgServices.add(HmgServices(0, TranslationBase.of(context).book, TranslationBase.of(context).appointmentLabel, "assets/images/new/book appointment.svg", isLogin));
hmgServices.add(HmgServices(1, TranslationBase.of(context).liveCare, TranslationBase.of(context).onlineConsulting, "assets/images/new/Live_Care.svg", isLogin));
hmgServices.add(HmgServices(2, TranslationBase.of(context).emergencyTitle, TranslationBase.of(context).emergencySubtitle, "assets/images/new/emergency.svg", isLogin));
hmgServices.add(HmgServices(3, TranslationBase.of(context).hhcHome, TranslationBase.of(context).healthCare, "assets/images/new/HHC.svg", isLogin));
hmgServices.add(HmgServices(4, TranslationBase.of(context).checkup, TranslationBase.of(context).comprehensive, "assets/images/new/comprehensive_checkup.svg", isLogin));
hmgServices.add(HmgServices(5, TranslationBase.of(context).online, TranslationBase.of(context).payment, "assets/images/new/paymentMethods.png", isLogin));
hmgServices.add(HmgServices(6, TranslationBase.of(context).ereferralTitle, TranslationBase.of(context).ereferralSubtitle, "assets/images/new/E_Referral.svg", isLogin));
hmgServices.add(HmgServices(7, TranslationBase.of(context).covidTest, TranslationBase.of(context).driveThru, "assets/images/new/CoronaIcon.svg", isLogin));
hmgServices.add(HmgServices(8, TranslationBase.of(context).connectTitle, TranslationBase.of(context).connectSubtitle, "assets/images/new/reach_us.svg", isLogin));
}
@override
@ -85,7 +85,7 @@ class _HomePageFragment2State extends State<HomePageFragment2> {
child: LoggedSliderView(
projectViewModel,
new SliderData(
TranslationBase.of(context).fileno + ": " + (projectViewModel.user.patientID.toString()?? ""),
TranslationBase.of(context).fileno + ": " + (projectViewModel.user.patientID.toString() ?? ""),
projectViewModel.user.firstName! + ' ' + (projectViewModel.user.lastName ?? ""),
"",
bannerColor[0].darkColor,
@ -102,7 +102,8 @@ class _HomePageFragment2State extends State<HomePageFragment2> {
margin: EdgeInsets.only(left: 20, right: 20, top: 8, bottom: 6),
child: SliderView(
onLoginClick: () {
widget.onLoginClick;
print("-----------");
widget.onLoginClick!();
projectViewModel.analytics.loginRegistration.login_register_initiate();
},
),

@ -17,7 +17,7 @@ import 'landing_page_pharmcy.dart';
class HomePage2 extends StatefulWidget {
final Function? goToMyProfile;
Function? onLoginClick, onMedicalFileClick;
VoidCallback? onLoginClick, onMedicalFileClick;
HomePage2({Key? key, this.goToMyProfile, this.onLoginClick, this.onMedicalFileClick});

@ -497,12 +497,11 @@ class _LandingPageState extends State<LandingPage> with WidgetsBindingObserver {
setState(() {
currentTab = 0;
});
pageController.jumpToPage(0);
},
),
projectViewModel.isLogin && model.notificationsCount != null && !projectViewModel.isLoginChild
? new Positioned(
? Positioned(
right: projectViewModel.isArabic ? 35 : 0,
top: 5,
child: new Container(
@ -515,9 +514,9 @@ class _LandingPageState extends State<LandingPage> with WidgetsBindingObserver {
minWidth: 20,
minHeight: 20,
),
child: new Text(
child: Text(
model.notificationsCount.toString(),
style: new TextStyle(
style: TextStyle(
color: Colors.white,
fontSize: projectViewModel.isArabic ? 8 : 9,
),
@ -566,6 +565,7 @@ class _LandingPageState extends State<LandingPage> with WidgetsBindingObserver {
changeCurrentTab(1);
},
onLoginClick: () {
print("here i am");
login();
},
onMedicalFileClick: () {
@ -645,7 +645,9 @@ class _LandingPageState extends State<LandingPage> with WidgetsBindingObserver {
authService.getDashboard().then((value) => {
setState(() {
if (value != null) {
notificationCount = value['List_PatientDashboard'].isNotEmpty?? value['List_PatientDashboard'][0]['UnreadPatientNotificationCount'] > 99 ? '99+' : value['List_PatientDashboard'][0]['UnreadPatientNotificationCount'].toString();
notificationCount = value['List_PatientDashboard'].isNotEmpty ?? value['List_PatientDashboard'][0]['UnreadPatientNotificationCount'] > 99
? '99+'
: value['List_PatientDashboard'][0]['UnreadPatientNotificationCount'].toString();
model.setState(model.count, true, notificationCount);
sharedPref.setString(NOTIFICATION_COUNT, notificationCount);
FlutterAppIconBadge.updateBadge(int.parse(notificationCount));

@ -8,11 +8,16 @@ import 'package:diplomaticquarterapp/widgets/buttons/custom_text_button.dart';
import 'package:flutter/material.dart';
import 'package:provider/provider.dart';
class SliderView extends StatelessWidget {
Function onLoginClick;
class SliderView extends StatefulWidget {
VoidCallback onLoginClick;
SliderView({required this.onLoginClick});
@override
State<SliderView> createState() => _SliderViewState();
}
class _SliderViewState extends State<SliderView> {
late ProjectViewModel projectViewModel;
@override
@ -96,7 +101,8 @@ class SliderView extends StatelessWidget {
backgroundColor: Color(0xFFFBF2E31),
elevation: 0,
onPressed: () {
onLoginClick();
widget.onLoginClick();
},
child: Center(
child: AutoSizeText(

@ -138,8 +138,8 @@ class _Login extends State<Login> {
DefaultButton(
TranslationBase.of(context).login,
() {
// if (!isButtonDisabled)
this.startLogin();
if (!isButtonDisabled)
this.startLogin();
},
disabledColor: Color(0xff575757),
),
@ -231,9 +231,9 @@ class _Login extends State<Login> {
}
startLogin() {
//if (isButtonDisabled == false) {
checkUserAuthentication();
// }
if (isButtonDisabled == false) {
checkUserAuthentication();
}
}
void validateForm() {
@ -276,7 +276,8 @@ class _Login extends State<Login> {
if (value['IsAuthenticated']) {
this.checkActivationCode();
}
// } else {
}
// else {
// ConfirmDialog activationDialog = new ConfirmDialog(
// context: context,
// confirmMessage: TranslationBase.of(context).accountDeactivatedMsg,

@ -2,6 +2,7 @@ import 'package:diplomaticquarterapp/core/viewModels/medical/ask_doctor_view_mod
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/pages/base/base_view.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/uitl/utils.dart';
import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
import 'package:diplomaticquarterapp/widgets/others/app_expandable_notifier.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';

@ -96,7 +96,7 @@ class _LaboratoryResultPageState extends State<LaboratoryResultPage> {
TranslationBase.of(context).downloadReport,
() async {
GifLoaderDialogUtils.showMyDialog(context);
await model.sendLabReportEmail(patientLabOrder: widget.patientLabOrders, mes: TranslationBase.of(context).sendSuc, userObj: projectViewModel.user, isVidaPlus: Utils.isVidaPlusProject(projectViewModel, num.parse(widget.patientLabOrders.projectID)), isDownload: true);
await model.sendLabReportEmail(patientLabOrder: widget.patientLabOrders, mes: TranslationBase.of(context).sendSuc, userObj: projectViewModel.user, isVidaPlus: Utils.isVidaPlusProject(projectViewModel, int.parse(widget.patientLabOrders!.projectID!)), isDownload: true);
GifLoaderDialogUtils.hideDialog(context);
try {
String path = await _createFileFromString(model.labReportPDF, "pdf");

@ -103,9 +103,9 @@ class WeightYearPage extends StatelessWidget {
TableRow(
children: [
Utils.tableColumnValue('${DateUtil.getDayMonthYearDateFormatted(diabtec.weightDate)} ',
isCapitable: false, mProjectViewModel: projectViewModel),
Utils.tableColumnValue('${diabtec.weightDate.hour}:${diabtec.weightDate.minute}', isCapitable: false, mProjectViewModel: projectViewModel),
Utils.tableColumnValue('${diabtec.weightMeasured}', isCapitable: false, mProjectViewModel: projectViewModel),
isCapitable: false, mProjectViewModel: projectViewModel!),
Utils.tableColumnValue('${diabtec.weightDate.hour}:${diabtec.weightDate.minute}', isCapitable: false, mProjectViewModel: projectViewModel!),
Utils.tableColumnValue('${diabtec.weightMeasured}', isCapitable: false, mProjectViewModel: projectViewModel!),
],
),
);

@ -95,10 +95,10 @@ class BloodSugarWeeklyPage extends StatelessWidget {
tableRow.add(
TableRow(
children: [
Utils.tableColumnValue(DateUtil.getDayMonthYearDateFormatted(diabtec.dateChart!), isCapitable: false, mProjectViewModel: projectViewModel),
Utils.tableColumnValue(diabtec.dateChart!.hour.toString() + ':' + diabtec.dateChart!.minute.toString(), isCapitable: false, mProjectViewModel: projectViewModel),
Utils.tableColumnValue(diabtec.measuredDesc!, isCapitable: false, mProjectViewModel: projectViewModel),
Utils.tableColumnValue(diabtec.resultValue.toString(), isCapitable: false, mProjectViewModel: projectViewModel),
Utils.tableColumnValue(DateUtil.getDayMonthYearDateFormatted(diabtec.dateChart!), isCapitable: false, mProjectViewModel: projectViewModel!),
Utils.tableColumnValue(diabtec.dateChart!.hour.toString() + ':' + diabtec.dateChart!.minute.toString(), isCapitable: false, mProjectViewModel: projectViewModel!),
Utils.tableColumnValue(diabtec.measuredDesc!, isCapitable: false, mProjectViewModel: projectViewModel!),
Utils.tableColumnValue(diabtec.resultValue.toString(), isCapitable: false, mProjectViewModel: projectViewModel!),
Column(crossAxisAlignment: CrossAxisAlignment.start, mainAxisSize: MainAxisSize.min, children: [
SizedBox(height: 12),
Container(

@ -71,7 +71,7 @@ class RadiologyHomePage extends StatelessWidget {
physics: NeverScrollableScrollPhysics(),
padding: EdgeInsets.only(bottom: 14, top: 14, left: 21, right: 21),
itemBuilder: (context, _index) {
FinalRadiology radiology = model.finalRadiologyList[index].finalRadiologyList[_index];
FinalRadiology radiology = model.finalRadiologyList[index].finalRadiologyList![_index];
bool _isSortByClinic = model.filterType == FilterType.Clinic;
return DoctorCard(
onTap: () => Navigator.push(

@ -12,6 +12,7 @@ import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:provider/provider.dart';
class PaymentService extends StatelessWidget {
ToDoCountProviderModel? model;
@ -55,7 +56,7 @@ class PaymentService extends StatelessWidget {
}
List<Widget> getPaymentServiceList(BuildContext context) {
List<Widget> medical =[];
List<Widget> medical = [];
medical.add(
InkWell(
@ -95,12 +96,13 @@ class PaymentService extends StatelessWidget {
left: 8,
top: 4,
child: badge_import.Badge(
toAnimate: false,
elevation: 0,
badgeStyle: badge_import.BadgeStyle(
shape: badge_import.BadgeShape.circle,
elevation: 0,
badgeColor: secondaryColor!.withOpacity(1.0),
borderRadius: BorderRadius.circular(8),
),
position: badge_import.BadgePosition.topEnd(),
shape: badge_import.BadgeShape.circle,
badgeColor: secondaryColor.withOpacity(1.0),
borderRadius: BorderRadius.circular(8),
badgeContent: Container(
padding: EdgeInsets.all(2.0),
child: Text(model!.count.toString(), style: TextStyle(color: Colors.white, fontWeight: FontWeight.bold, fontSize: 12.0)),
@ -111,12 +113,13 @@ class PaymentService extends StatelessWidget {
right: 8,
top: 4,
child: badge_import.Badge(
toAnimate: false,
elevation: 0,
position: badge_import.BadgePosition.topEnd(),
shape: badge_import.BadgeShape.circle,
badgeColor: secondaryColor.withOpacity(1.0),
borderRadius: BorderRadius.circular(8),
badgeStyle: badge_import.BadgeStyle(
shape: badge_import.BadgeShape.circle,
elevation: 0,
badgeColor: secondaryColor!.withOpacity(1.0),
borderRadius: BorderRadius.circular(8),
),
badgeContent: Container(
padding: EdgeInsets.all(2.0),
child: Text(model!.count.toString(), style: TextStyle(color: Colors.white, fontWeight: FontWeight.bold, fontSize: 12.0)),
@ -150,7 +153,7 @@ class PaymentService extends StatelessWidget {
navigateToToDoPage(BuildContext context) {
if (projectViewModel!.isLogin) {
// if (model.count != 0) {
Navigator.push(context, FadePage(page: ToDo(isShowAppBar: true)));
Navigator.push(context, FadePage(page: ToDo(isShowAppBar: true)));
// } else {
// AppToast.showErrorToast(message: TranslationBase.of(context).upcomingEmpty);
// }

@ -34,7 +34,7 @@ class FamilyFilesProvider with ChangeNotifier {
bool isLogin = false;
bool isLoading = true;
dynamic authenticatedUser;
GetAllSharedRecordsByStatusResponse? allSharedRecordsByStatusResponse;
GetAllSharedRecordsByStatusResponse allSharedRecordsByStatusResponse = GetAllSharedRecordsByStatusResponse();
Future<GetAllSharedRecordsByStatusResponse> getSharedRecordByStatus() async {
dynamic localRes;

@ -101,14 +101,9 @@ class Utils {
static showPermissionConsentDialog(BuildContext context, String message, VoidCallback? onTap) {
showDialog(
context: context,
builder: (cxt) =>
CovidConsentDialog(
okTitle: TranslationBase
.of(context)
.acceptLbl,
title: TranslationBase
.of(context)
.covidConsentHeader,
builder: (cxt) => CovidConsentDialog(
okTitle: TranslationBase.of(context).acceptLbl,
title: TranslationBase.of(context).covidConsentHeader,
message: message,
onTap: onTap!,
));
@ -161,10 +156,7 @@ class Utils {
}
static String getAdvancePaymentTransID(int projectID, int fileNumber) {
return projectID.toString() + '-' + fileNumber.toString() + '-' + DateTime
.now()
.millisecondsSinceEpoch
.toString();
return projectID.toString() + '-' + fileNumber.toString() + '-' + DateTime.now().millisecondsSinceEpoch.toString();
}
bool validateIDBox(String value, int type) {
@ -233,86 +225,74 @@ class Utils {
onTap: () => projectViewModel!.havePrivilege(5) ? Navigator.push(context!, FadePage(page: MyAppointments())) : null,
child: isLogin!
? Stack(children: [
Container(
width: double.infinity,
height: double.infinity,
child: MedicalProfileItem(
title: TranslationBase
.of(context!)
.myAppointments,
Container(
width: double.infinity,
height: double.infinity,
child: MedicalProfileItem(
title: TranslationBase.of(context!).myAppointments,
imagePath: 'appointment_list.svg',
subTitle: TranslationBase.of(context!).myAppointmentsList,
hasBadge: true,
isEnable: projectViewModel!.havePrivilege(5)),
),
projectViewModel.isArabic
? !projectViewModel.user!.isFamily
? Positioned(
left: 8,
top: 4,
child: badge_import.Badge(
badgeAnimation: badge_import.BadgeAnimation.fade(toAnimate: false),
badgeStyle: badge_import.BadgeStyle(
elevation: 0,
shape: badge_import.BadgeShape.circle,
badgeColor: secondaryColor!.withOpacity(1.0),
borderRadius: BorderRadius.circular(8),
),
position: badge_import.BadgePosition.topEnd(),
badgeContent: Container(
padding: EdgeInsets.all(2.0),
child: Text(count.toString(), style: TextStyle(color: Colors.white, fontWeight: FontWeight.bold, fontSize: 12.0)),
),
),
)
: Container()
: !projectViewModel.user!.isFamily
? Positioned(
right: 8,
top: 4,
child: badge_import.Badge(
position: badge_import.BadgePosition.topEnd(),
badgeAnimation: badge_import.BadgeAnimation.fade(toAnimate: false),
badgeStyle: badge_import.BadgeStyle(
elevation: 0,
shape: badge_import.BadgeShape.circle,
badgeColor: secondaryColor!.withOpacity(1.0),
borderRadius: BorderRadius.circular(8),
),
badgeContent: Container(
padding: EdgeInsets.all(2.0),
child: Text(count.toString(), style: TextStyle(color: Colors.white, fontWeight: FontWeight.bold, fontSize: 12.0)),
),
),
)
: Container(),
])
: MedicalProfileItem(
title: TranslationBase.of(context!).myAppointments,
imagePath: 'appointment_list.svg',
subTitle: TranslationBase
.of(context!)
.myAppointmentsList,
subTitle: TranslationBase.of(context!).myAppointmentsList,
hasBadge: true,
isEnable: projectViewModel!.havePrivilege(5)),
),
projectViewModel.isArabic
? !projectViewModel.user!.isFamily
? Positioned(
left: 8,
top: 4,
child: badge_import.Badge(
badgeAnimation: badge_import.BadgeAnimation.fade(toAnimate: false),
badgeStyle: badge_import.BadgeStyle(
elevation: 0,
shape: badge_import.BadgeShape.circle,
badgeColor: secondaryColor!.withOpacity(1.0),
borderRadius: BorderRadius.circular(8),
),
position: badge_import.BadgePosition.topEnd(),
badgeContent: Container(
padding: EdgeInsets.all(2.0),
child: Text(count.toString(), style: TextStyle(color: Colors.white, fontWeight: FontWeight.bold, fontSize: 12.0)),
isEnable: projectViewModel!.havePrivilege(5),
),
),
)
: Container()
: !projectViewModel.user!.isFamily
? Positioned(
right: 8,
top: 4,
child: badge_import.Badge(
position: badge_import.BadgePosition.topEnd(),
badgeAnimation: badge_import.BadgeAnimation.fade(toAnimate: false),
badgeStyle: badge_import.BadgeStyle(
elevation: 0,
shape: badge_import.BadgeShape.circle,
badgeColor: secondaryColor!.withOpacity(1.0),
borderRadius: BorderRadius.circular(8),
),
badgeContent: Container(
padding: EdgeInsets.all(2.0),
child: Text(count.toString(), style: TextStyle(color: Colors.white, fontWeight: FontWeight.bold, fontSize: 12.0)),
),
),
)
: Container(),
])
: MedicalProfileItem(
title: TranslationBase
.of(context!)
.myAppointments,
imagePath: 'appointment_list.svg',
subTitle: TranslationBase
.of(context!)
.myAppointmentsList,
hasBadge: true,
isEnable: projectViewModel!.havePrivilege(5),
),
));
if (projectViewModel.havePrivilege(10)) {
medical.add(InkWell(
onTap: () => Navigator.push(context, FadePage(page: LabsHomePage())),
child: MedicalProfileItem(
title: TranslationBase
.of(context)
.lab,
title: TranslationBase.of(context).lab,
imagePath: 'lab_result.svg',
subTitle: TranslationBase
.of(context)
.labSubtitle,
subTitle: TranslationBase.of(context).labSubtitle,
),
));
}
@ -320,47 +300,34 @@ class Utils {
medical.add(InkWell(
onTap: () => projectViewModel.havePrivilege(7) ? Navigator.push(context, FadePage(page: RadiologyHomePage())) : null,
child: MedicalProfileItem(
title: TranslationBase
.of(context)
.radiology,
title: TranslationBase.of(context).radiology,
imagePath: 'radiology.svg',
subTitle: TranslationBase
.of(context)
.radiologySubtitle,
subTitle: TranslationBase.of(context).radiologySubtitle,
isEnable: projectViewModel.havePrivilege(7),
),
);
));
medical.add(InkWell(
onTap: () => projectViewModel.havePrivilege(12) ? Navigator.push(context, FadePage(page: HomePrescriptionsPage())) : null,
child: MedicalProfileItem(
title: TranslationBase
.of(context)
.medicines,
title: TranslationBase.of(context).medicines,
imagePath: 'medicine_prescription.svg',
subTitle: TranslationBase
.of(context)
.medicinesSubtitle,
subTitle: TranslationBase.of(context).medicinesSubtitle,
isEnable: projectViewModel.havePrivilege(12),
),
));
medical.add(InkWell(
onTap: () =>
projectViewModel.havePrivilege(25)
onTap: () => projectViewModel.havePrivilege(25)
? Navigator.push(
context,
FadePage(page: VitalSignDetailsScreen()),
)
context,
FadePage(page: VitalSignDetailsScreen()),
)
: null,
child: MedicalProfileItem(
title: TranslationBase
.of(context)
.vitalSigns,
title: TranslationBase.of(context).vitalSigns,
imagePath: 'vital_signs.svg',
subTitle: TranslationBase
.of(context)
.vitalSignsSubtitle,
subTitle: TranslationBase.of(context).vitalSignsSubtitle,
isEnable: projectViewModel.havePrivilege(25),
),
));
@ -370,45 +337,32 @@ class Utils {
if (projectViewModel.havePrivilege(48)) Navigator.push(context, FadePage(page: ActiveMedicationsPage()));
},
child: MedicalProfileItem(
title: TranslationBase
.of(context)
.myMedical,
title: TranslationBase.of(context).myMedical,
imagePath: 'active_medication.svg',
subTitle: TranslationBase
.of(context)
.myMedicalSubtitle,
subTitle: TranslationBase.of(context).myMedicalSubtitle,
isEnable: projectViewModel.havePrivilege(48),
),
));
medical.add(InkWell(
onTap: () =>
projectViewModel.havePrivilege(6)
onTap: () => projectViewModel.havePrivilege(6)
? Navigator.push(
context,
FadePage(
page: DoctorHomePage(),
),
)
context,
FadePage(
page: DoctorHomePage(),
),
)
: null,
child:
MedicalProfileItem(title: TranslationBase
.of(context)
.myDoctor, imagePath: 'my_doc.svg', subTitle: TranslationBase
.of(context)
.myDoctorSubtitle, isEnable: projectViewModel.havePrivilege(6)),
MedicalProfileItem(title: TranslationBase.of(context).myDoctor, imagePath: 'my_doc.svg', subTitle: TranslationBase.of(context).myDoctorSubtitle, isEnable: projectViewModel.havePrivilege(6)),
));
medical.add(InkWell(
onTap: () => projectViewModel.havePrivilege(14) ? Navigator.push(context, FadePage(page: MyInvoices())) : null,
child: MedicalProfileItem(
title: TranslationBase
.of(context)
.invoicesList,
title: TranslationBase.of(context).invoicesList,
imagePath: 'invoice_list.svg',
subTitle: TranslationBase
.of(context)
.myInvoice,
subTitle: TranslationBase.of(context).myInvoice,
isEnable: projectViewModel.havePrivilege(14),
),
));
@ -417,14 +371,10 @@ class Utils {
onTap: () => projectViewModel.havePrivilege(85) ? Navigator.push(context, FadePage(page: AnicllaryOrders())) : null,
// onTap: () => Navigator.push(context, FadePage(page: AnicllaryOrders())),
child: MedicalProfileItem(
title: TranslationBase
.of(context)
.anicllaryOrders,
title: TranslationBase.of(context).anicllaryOrders,
imagePath: 'ancillary.svg',
isPngImage: false,
subTitle: TranslationBase
.of(context)
.myInvoice,
subTitle: TranslationBase.of(context).myInvoice,
isEnable: projectViewModel.havePrivilege(85),
),
));
@ -432,35 +382,26 @@ class Utils {
medical.add(InkWell(
onTap: () => projectViewModel.havePrivilege(14) ? Navigator.push(context, FadePage(page: EyeMeasurementsPage())) : null,
child: MedicalProfileItem(
title: TranslationBase
.of(context)
.eye,
title: TranslationBase.of(context).eye,
imagePath: 'eye_measurement.svg',
subTitle: TranslationBase
.of(context)
.eyeSubtitle,
subTitle: TranslationBase.of(context).eyeSubtitle,
isEnable: projectViewModel.havePrivilege(14),
),
));
medical.add(InkWell(
onTap: () =>
projectViewModel.havePrivilege(22)
onTap: () => projectViewModel.havePrivilege(22)
? Navigator.push(
context,
FadePage(
page: InsuranceCard(
context,
FadePage(
page: InsuranceCard(
appointmentNo: 0,
)))
: null,
child: MedicalProfileItem(
title: TranslationBase
.of(context)
.insurance,
title: TranslationBase.of(context).insurance,
imagePath: 'insurance_card.svg',
subTitle: TranslationBase
.of(context)
.insuranceSubtitle,
subTitle: TranslationBase.of(context).insuranceSubtitle,
isEnable: projectViewModel.havePrivilege(22),
),
));
@ -470,34 +411,25 @@ class Utils {
Navigator.push(context, FadePage(page: InsuranceUpdate()));
},
child: MedicalProfileItem(
title: TranslationBase
.of(context)
.updateInsurance,
title: TranslationBase.of(context).updateInsurance,
imagePath: 'insurance_card.svg',
subTitle: TranslationBase
.of(context)
.updateInsuranceSubtitle,
subTitle: TranslationBase.of(context).updateInsuranceSubtitle,
),
));
medical.add(InkWell(
onTap: () =>
projectViewModel.havePrivilege(18)
onTap: () => projectViewModel.havePrivilege(18)
? Navigator.push(
context,
FadePage(
page: InsuranceApproval(
context,
FadePage(
page: InsuranceApproval(
appointmentNo: 0,
)))
: null,
child: MedicalProfileItem(
title: TranslationBase
.of(context)
.insuranceApproval,
title: TranslationBase.of(context).insuranceApproval,
imagePath: 'insurance_approval.svg',
subTitle: TranslationBase
.of(context)
.insuranceApprovalSubtitle,
subTitle: TranslationBase.of(context).insuranceApprovalSubtitle,
isEnable: projectViewModel.havePrivilege(18),
),
));
@ -505,13 +437,9 @@ class Utils {
medical.add(InkWell(
onTap: () => projectViewModel.havePrivilege(23) ? Navigator.push(context, FadePage(page: AllergiesPage())) : null,
child: MedicalProfileItem(
title: TranslationBase
.of(context)
.allergies,
title: TranslationBase.of(context).allergies,
imagePath: 'allergies_diagnosed.svg',
subTitle: TranslationBase
.of(context)
.allergiesSubtitle,
subTitle: TranslationBase.of(context).allergiesSubtitle,
isEnable: projectViewModel.havePrivilege(23),
),
));
@ -519,13 +447,9 @@ class Utils {
medical.add(InkWell(
onTap: () => projectViewModel.havePrivilege(26) ? Navigator.push(context, FadePage(page: MyVaccines())) : null,
child: MedicalProfileItem(
title: TranslationBase
.of(context)
.myVaccines,
title: TranslationBase.of(context).myVaccines,
imagePath: 'vaccine_list.svg',
subTitle: TranslationBase
.of(context)
.myVaccinesSubtitle,
subTitle: TranslationBase.of(context).myVaccinesSubtitle,
isEnable: projectViewModel.havePrivilege(26),
),
));
@ -533,13 +457,9 @@ class Utils {
medical.add(InkWell(
onTap: () => projectViewModel.havePrivilege(20) ? Navigator.push(context, FadePage(page: HomeReportPage())) : null,
child: MedicalProfileItem(
title: TranslationBase
.of(context)
.medical,
title: TranslationBase.of(context).medical,
imagePath: 'medical_report.svg',
subTitle: TranslationBase
.of(context)
.medicalSubtitle,
subTitle: TranslationBase.of(context).medicalSubtitle,
isEnable: projectViewModel.havePrivilege(20),
),
));
@ -547,13 +467,9 @@ class Utils {
medical.add(InkWell(
onTap: () => projectViewModel.havePrivilege(19) ? Navigator.push(context, FadePage(page: MonthlyReportsPage())) : null,
child: MedicalProfileItem(
title: TranslationBase
.of(context)
.monthly,
title: TranslationBase.of(context).monthly,
imagePath: 'monthly_report.svg',
subTitle: TranslationBase
.of(context)
.monthlySubtitle,
subTitle: TranslationBase.of(context).monthlySubtitle,
isEnable: projectViewModel.havePrivilege(19),
),
));
@ -561,13 +477,9 @@ class Utils {
medical.add(InkWell(
onTap: () => projectViewModel.havePrivilege(16) ? Navigator.push(context, FadePage(page: PatientSickLeavePage())) : null,
child: MedicalProfileItem(
title: TranslationBase
.of(context)
.sick,
title: TranslationBase.of(context).sick,
imagePath: 'sick_leave.svg',
subTitle: TranslationBase
.of(context)
.sickSubtitle,
subTitle: TranslationBase.of(context).sickSubtitle,
isEnable: projectViewModel.havePrivilege(16),
),
));
@ -575,13 +487,9 @@ class Utils {
medical.add(InkWell(
onTap: () => projectViewModel.havePrivilege(47) ? Navigator.push(context, FadePage(page: MyBalancePage())) : null,
child: MedicalProfileItem(
title: TranslationBase
.of(context)
.myBalance,
title: TranslationBase.of(context).myBalance,
imagePath: 'balance_credit.svg',
subTitle: TranslationBase
.of(context)
.myBalanceSubtitle,
subTitle: TranslationBase.of(context).myBalanceSubtitle,
isEnable: projectViewModel.havePrivilege(47),
),
));
@ -596,13 +504,9 @@ class Utils {
medical.add(InkWell(
onTap: () => projectViewModel.havePrivilege(24) ? Navigator.push(context, FadePage(page: MyTrackers())) : null,
child: MedicalProfileItem(
title: TranslationBase
.of(context)
.myTrackers,
title: TranslationBase.of(context).myTrackers,
imagePath: 'tracker.svg',
subTitle: TranslationBase
.of(context)
.myTrackersSubtitle,
subTitle: TranslationBase.of(context).myTrackersSubtitle,
isEnable: projectViewModel.havePrivilege(24),
),
));
@ -610,13 +514,9 @@ class Utils {
medical.add(InkWell(
onTap: () => projectViewModel.havePrivilege(30) ? Navigator.push(context, FadePage(page: SmartWatchInstructions())) : null,
child: MedicalProfileItem(
title: TranslationBase
.of(context)
.smartWatchesSubtitle,
title: TranslationBase.of(context).smartWatchesSubtitle,
imagePath: 'smart_watch.svg',
subTitle: TranslationBase
.of(context)
.smartWatches,
subTitle: TranslationBase.of(context).smartWatches,
isEnable: projectViewModel.havePrivilege(30),
),
));
@ -624,20 +524,14 @@ class Utils {
medical.add(InkWell(
onTap: () => projectViewModel.havePrivilege(28) ? Navigator.push(context, FadePage(page: AskDoctorHomPage())) : null,
child: MedicalProfileItem(
title: TranslationBase
.of(context)
.askYourSubtitle, imagePath: 'ask_doctor.svg', subTitle: TranslationBase
.of(context)
.askYour, isEnable: projectViewModel.havePrivilege(28)),
title: TranslationBase.of(context).askYourSubtitle, imagePath: 'ask_doctor.svg', subTitle: TranslationBase.of(context).askYour, isEnable: projectViewModel.havePrivilege(28)),
));
if (projectViewModel.havePrivilege(32) || true) {
medical.add(InkWell(
onTap: () {
if (Platform.isAndroid) {
showPermissionConsentDialog(context, TranslationBase
.of(context)
.wifiPermission, () {
showPermissionConsentDialog(context, TranslationBase.of(context).wifiPermission, () {
connectWifi(projectViewModel, context);
});
} else {
@ -645,13 +539,9 @@ class Utils {
}
},
child: MedicalProfileItem(
title: TranslationBase
.of(context)
.internet,
title: TranslationBase.of(context).internet,
imagePath: 'internet_connection.svg',
subTitle: TranslationBase
.of(context)
.internetSubtitle,
subTitle: TranslationBase.of(context).internetSubtitle,
),
));
}
@ -659,13 +549,9 @@ class Utils {
medical.add(InkWell(
onTap: () => projectViewModel.havePrivilege(40) ? launch('whatsapp://send?phone=18885521858&text=') : null,
child: MedicalProfileItem(
title: TranslationBase
.of(context)
.chatbot,
title: TranslationBase.of(context).chatbot,
imagePath: 'chatbot.svg',
subTitle: TranslationBase
.of(context)
.chatbotSubtitle,
subTitle: TranslationBase.of(context).chatbotSubtitle,
isEnable: projectViewModel.havePrivilege(40),
),
));
@ -734,81 +620,69 @@ class Utils {
onTap: () => projectViewModel!.havePrivilege(5) ? Navigator.push(context!, FadePage(page: MyAppointments())) : null,
child: isLogin!
? Stack(children: [
MedicalProfileItem(
title: TranslationBase
.of(context!)
.myAppointments,
imagePath: 'appointment_list.svg',
subTitle: TranslationBase
.of(context!)
.myAppointmentsList,
hasBadge: true,
isEnable: projectViewModel!.havePrivilege(5)),
projectViewModel.isArabic!
? !projectViewModel.isLoginChild
? Positioned(
left: 8,
top: 4,
child: badge_import.Badge(
position: badge_import.BadgePosition.topEnd(),
badgeAnimation: badge_import.BadgeAnimation.fade(toAnimate: false),
badgeStyle: badge_import.BadgeStyle(
elevation: 0,
shape: badge_import.BadgeShape.circle,
badgeColor: secondaryColor!.withOpacity(1.0),
borderRadius: BorderRadius.circular(8),
),
badgeContent: Container(
padding: EdgeInsets.all(2.0),
child: Text(count.toString(), style: TextStyle(color: Colors.white, fontWeight: FontWeight.bold, fontSize: 12.0)),
),
),
)
: Container()
: !projectViewModel.isLoginChild
? Positioned(
right: 8,
top: 4,
child: badge_import.Badge(
badgeAnimation: badge_import.BadgeAnimation.fade(toAnimate: false),
badgeStyle: badge_import.BadgeStyle(
elevation: 0,
shape: badge_import.BadgeShape.circle,
badgeColor: secondaryColor!.withOpacity(1.0),
borderRadius: BorderRadius.circular(8),
),
position: badge_import.BadgePosition.topEnd(),
badgeContent: Container(
padding: EdgeInsets.all(2.0),
child: Text(count.toString(), style: TextStyle(color: Colors.white, fontWeight: FontWeight.bold, fontSize: 12.0)),
),
),
)
: Container(),
])
MedicalProfileItem(
title: TranslationBase.of(context!).myAppointments,
imagePath: 'appointment_list.svg',
subTitle: TranslationBase.of(context!).myAppointmentsList,
hasBadge: true,
isEnable: projectViewModel!.havePrivilege(5)),
projectViewModel.isArabic!
? !projectViewModel.isLoginChild
? Positioned(
left: 8,
top: 4,
child: badge_import.Badge(
position: badge_import.BadgePosition.topEnd(),
badgeAnimation: badge_import.BadgeAnimation.fade(toAnimate: false),
badgeStyle: badge_import.BadgeStyle(
elevation: 0,
shape: badge_import.BadgeShape.circle,
badgeColor: secondaryColor!.withOpacity(1.0),
borderRadius: BorderRadius.circular(8),
),
badgeContent: Container(
padding: EdgeInsets.all(2.0),
child: Text(count.toString(), style: TextStyle(color: Colors.white, fontWeight: FontWeight.bold, fontSize: 12.0)),
),
),
)
: Container()
: !projectViewModel.isLoginChild
? Positioned(
right: 8,
top: 4,
child: badge_import.Badge(
badgeAnimation: badge_import.BadgeAnimation.fade(toAnimate: false),
badgeStyle: badge_import.BadgeStyle(
elevation: 0,
shape: badge_import.BadgeShape.circle,
badgeColor: secondaryColor!.withOpacity(1.0),
borderRadius: BorderRadius.circular(8),
),
position: badge_import.BadgePosition.topEnd(),
badgeContent: Container(
padding: EdgeInsets.all(2.0),
child: Text(count.toString(), style: TextStyle(color: Colors.white, fontWeight: FontWeight.bold, fontSize: 12.0)),
),
),
)
: Container(),
])
: MedicalProfileItem(
title: TranslationBase
.of(context!)
.myAppointments,
imagePath: 'appointment_list.svg',
subTitle: TranslationBase
.of(context!)
.myAppointmentsList,
hasBadge: true,
isEnable: projectViewModel!.havePrivilege(5),
),
title: TranslationBase.of(context!).myAppointments,
imagePath: 'appointment_list.svg',
subTitle: TranslationBase.of(context!).myAppointmentsList,
hasBadge: true,
isEnable: projectViewModel!.havePrivilege(5),
),
));
medical.add(InkWell(
onTap: () => projectViewModel.havePrivilege(10) ? Navigator.push(context, FadePage(page: LabsHomePage())) : null,
child: MedicalProfileItem(
title: TranslationBase
.of(context)
.lab,
title: TranslationBase.of(context).lab,
imagePath: 'lab_result.svg',
subTitle: TranslationBase
.of(context)
.labSubtitle,
subTitle: TranslationBase.of(context).labSubtitle,
isEnable: projectViewModel.havePrivilege(10),
),
));
@ -816,13 +690,9 @@ class Utils {
medical.add(InkWell(
onTap: () => projectViewModel.havePrivilege(7) ? Navigator.push(context, FadePage(page: RadiologyHomePage())) : null,
child: MedicalProfileItem(
title: TranslationBase
.of(context)
.radiology,
title: TranslationBase.of(context).radiology,
imagePath: 'radiology.svg',
subTitle: TranslationBase
.of(context)
.radiologySubtitle,
subTitle: TranslationBase.of(context).radiologySubtitle,
isEnable: projectViewModel.havePrivilege(7),
),
));
@ -830,33 +700,24 @@ class Utils {
medical.add(InkWell(
onTap: () => projectViewModel.havePrivilege(12) ? Navigator.push(context, FadePage(page: HomePrescriptionsPage())) : null,
child: MedicalProfileItem(
title: TranslationBase
.of(context)
.medicines,
title: TranslationBase.of(context).medicines,
imagePath: 'medicine_prescription.svg',
subTitle: TranslationBase
.of(context)
.medicinesSubtitle,
subTitle: TranslationBase.of(context).medicinesSubtitle,
isEnable: projectViewModel.havePrivilege(12),
),
));
medical.add(InkWell(
onTap: () =>
projectViewModel.havePrivilege(6)
onTap: () => projectViewModel.havePrivilege(6)
? Navigator.push(
context,
FadePage(
page: DoctorHomePage(),
),
)
context,
FadePage(
page: DoctorHomePage(),
),
)
: null,
child:
MedicalProfileItem(title: TranslationBase
.of(context)
.myDoctor, imagePath: 'my_doc.svg', subTitle: TranslationBase
.of(context)
.myDoctorSubtitle, isEnable: projectViewModel.havePrivilege(6)),
MedicalProfileItem(title: TranslationBase.of(context).myDoctor, imagePath: 'my_doc.svg', subTitle: TranslationBase.of(context).myDoctorSubtitle, isEnable: projectViewModel.havePrivilege(6)),
));
return medical;
@ -896,11 +757,7 @@ class Utils {
SizedBox(height: 6),
Text(
text,
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),
),
SizedBox(height: 5),
if (showDivider)
@ -913,7 +770,7 @@ class Utils {
);
}
static Widget tableColumnValue(String text, {bool isLast = false, bool isCapitable = true, ProjectViewModel mProjectViewModel}) {
static Widget tableColumnValue(String text, {bool isLast = false, bool isCapitable = true, ProjectViewModel? mProjectViewModel}) {
ProjectViewModel projectViewModel = mProjectViewModel ?? Provider.of(AppGlobal.context);
return Column(
crossAxisAlignment: CrossAxisAlignment.start,
@ -974,13 +831,32 @@ class Utils {
return crypto.md5.convert(utf8.encode(input)).toString();
}
static String generateSignature() {
static bool isVidaPlusProject(ProjectViewModel projectViewModel, int projectID) {
bool isVidaPlus = false;
projectViewModel.vidaPlusProjectList.forEach((element) {
if (element.projectID == projectID) {
isVidaPlus = true;
}
});
return isVidaPlus;
}
static bool isHMCProject(ProjectViewModel projectViewModel, int projectID) {
bool isHMCProject = false;
projectViewModel.hMCProjectListModel.forEach((element) {
if (element.projectID == projectID) {
isHMCProject = true;
}
});
return isHMCProject;
}
// static String generateSignature() {
//
// }
}
Widget applyShadow({Color color = Colors.grey, double shadowOpacity = 0.5, double spreadRadius = 2, double blurRadius = 7, Offset offset = const Offset(2, 2), @required Widget child}) {
Widget applyShadow({Color color = Colors.grey, double shadowOpacity = 0.5, double spreadRadius = 2, double blurRadius = 7, Offset offset = const Offset(2, 2), required Widget child}) {
return Container(
decoration: BoxDecoration(
boxShadow: [
@ -1009,7 +885,7 @@ extension IndexedIterable<E> on Iterable<E> {
}
}
openAppStore({String androidPackageName, String iOSAppID, bool isHuawei = false}) async {
openAppStore({String? androidPackageName, String? iOSAppID, bool isHuawei = false}) async {
if (Platform.isAndroid) {
assert(!(androidPackageName == null), "Should have valid value in androidPackageName parameter");
if (isHuawei) {
@ -1023,7 +899,7 @@ openAppStore({String androidPackageName, String iOSAppID, bool isHuawei = false}
}
}
String labelFrom({@required String className}) {
String labelFrom({required String className}) {
RegExp exp = RegExp(r'(?<=[a-z])[A-Z]');
String result = className.replaceAllMapped(exp, (m) {

@ -21,15 +21,14 @@ class FlowChartPage extends StatelessWidget {
FlowChartPage({this.patientLabOrder, this.filterName});
ProjectViewModel projectViewModel;
ProjectViewModel? projectViewModel;
@override
Widget build(BuildContext context) {
projectViewModel = Provider.of(context);
return BaseView<LabsViewModel>(
onModelReady: (model) => model.getPatientLabOrdersResults(patientLabOrder: patientLabOrder!, procedure: filterName!),
onModelReady: (model) =>
model.getPatientLabOrdersResults(patientLabOrder: patientLabOrder, procedure: filterName, isVidaPlus: Utils.isVidaPlusProject(projectViewModel, num.parse(patientLabOrder.projectID))),
model.getPatientLabOrdersResults(patientLabOrder: patientLabOrder, procedure: filterName, isVidaPlus: Utils.isVidaPlusProject(projectViewModel!, int.parse(patientLabOrder!.projectID!))),
builder: (context, model, w) => AppScaffold(
isShowAppBar: true,
appBarTitle: filterName!,

@ -93,9 +93,9 @@ class DoctorCard extends StatelessWidget {
color: Utils.isHMCProject(projectViewModel, projectID)
? Color(0xff3FACC8)
: isLiveCareAppointment
: isLiveCareAppointment!
? Color(0xff2E303A)
: !isInOutPatient
: !isInOutPatient!
? Color(0xffD02127)
: Color(0xffa9a089),
borderRadius: BorderRadius.only(

@ -70,7 +70,7 @@ class AppScaffold extends StatefulWidget {
final List<ImagesInfo>? imagesInfo;
final bool isHelp;
final bool isLocalLoader;
final VoidCallbackAction? backButtonTab;
final VoidCallback? backButtonTab;
final String? icon;
final bool showDropDown;
final int? dropdownIndexValue;
@ -343,7 +343,7 @@ class NewAppBarWidget extends StatelessWidget implements PreferredSizeWidget {
final void Function(int?)? dropDownIndexChange;
final List<Widget>? appBarIcons;
Function? onTap;
VoidCallback? onTap;
NewAppBarWidget({Key? key, this.showTitle = false, this.showDropDown = false, this.title = "", this.dropDownList, this.appBarIcons, this.dropdownIndexValue, this.dropDownIndexChange, this.onTap})
: super(key: key);
@ -358,9 +358,7 @@ class NewAppBarWidget extends StatelessWidget implements PreferredSizeWidget {
// backgroundColor: Colors.red,
// automaticallyImplyLeading: false,
leading: ArrowBack(
onTap: () {
onTap;
},
onTap: onTap,
),
titleSpacing: -8,
// centerTitle: false,
@ -449,7 +447,7 @@ class AppBarWidget extends StatefulWidget implements PreferredSizeWidget {
final bool showOfferPackagesCart;
final bool isShowDecPage;
final Function()? backButtonTab;
final VoidCallback? backButtonTab;
Function(String)? badgeUpdater;
AppBarWidget(

@ -2,18 +2,27 @@ import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:flutter/material.dart';
import 'package:provider/provider.dart';
class ArrowBack extends StatelessWidget {
final Function? onTap;
class ArrowBack extends StatefulWidget {
final VoidCallback? onTap;
ArrowBack({Key? key, this.onTap,}) : super(key: key);
ArrowBack({
Key? key,
this.onTap,
}) : super(key: key);
@override
State<ArrowBack> createState() => _ArrowBackState();
}
class _ArrowBackState extends State<ArrowBack> {
@override
Widget build(BuildContext context) {
// ProjectViewModel projectViewModel = Provider.of(context);
return GestureDetector(
behavior: HitTestBehavior.opaque,
onTap: Feedback.wrapForTap(() {
onTap != null ? onTap! : Navigator.maybePop(context);
/// widget.onTap != null ? widget.onTap :
Navigator.maybePop(context);
}, context),
child: Icon(
Icons.arrow_back_ios,

@ -60,8 +60,6 @@ dependencies:
fluttertoast: ^8.0.8
firebase_messaging: ^14.1.0
firebase_analytics: ^10.0.5
# Progress bar
flutter_progress_hud: ^2.0.2
percent_indicator: ^4.2.3
@ -74,7 +72,7 @@ dependencies:
image_picker: ^1.0.4
#GIF image
# flutter_gifimage: ^1.0.1
# flutter_gifimage: ^1.0.1
flutter_gif: ^0.0.4
photo_view: any
# flutter_webrtc: any
@ -82,11 +80,6 @@ dependencies:
# UI Reqs
expandable: ^5.0.1
# Notification Banner
# dropdown_banner: ^1.4.0
# flutter_xlider: ^3.4.0
# flutter_local_notifications:
# charts
flutter_charts: ^0.5.2
google_maps_flutter: ^2.1.1
@ -96,11 +89,7 @@ dependencies:
huawei_push: ^6.5.0+300
# Qr code Scanner TODO fix it
# barcode_scanner: ^1.0.1
# flutter_polyline_points: ^1.0.0
location: ^5.0.3
# Qr code Scanner
# barcode_scan_fix: ^1.0.2
barcode_scan2: ^4.2.2
# Rating Stars
@ -128,57 +117,29 @@ dependencies:
hijri: ^3.0.0
#datetime_picker
#flutter_datetime_picker: ^1.5.1
flutter_datetime_picker_plus: ^2.1.0
# Carousel
# carousel_pro: ^1.0.0 //8/oct
carousel_pro_nullsafety: ^2.0.0
#local_notifications
flutter_local_notifications: any
#device_calendar
device_calendar: ^4.2.0
#Handle Geolocation
geolocator: ^9.0.2
#Handle lat long to address
geocoding: ^2.0.1
jiffy: ^6.2.1
#Flutter WebRTC
flutter_webrtc: ^0.9.7
screen_brightness: ^0.2.2+1
#google maps places
google_maps_place_picker_mb: ^3.0.0
# google_maps_place_picker: ^2.1.0-nullsafety.3
map_launcher: ^3.0.1
#countdown timer for Upcoming List
flutter_countdown_timer: ^4.1.0
#Dependencies for video call implementation
native_device_orientation: ^1.0.0
wakelock: ^0.6.2
after_layout: ^1.1.0
# twilio_programmable_video: ^0.11.0+1
cached_network_image: ^3.1.0+1
# flutter_tts:
# path: flutter_tts-voice_enhancement
flutter_tts: ^3.6.1
# wifi: ^0.1.5 //18/oct
vibration: ^1.7.3
flutter_nfc_kit: ^3.3.1
# geofencing: ^0.1.0 //18/oct
speech_to_text: ^6.1.1
# path: speech_to_text
#in_app_update: ^4.2.2
@ -186,51 +147,29 @@ dependencies:
badges: ^3.1.2
flutter_app_icon_badge: ^2.0.0
# syncfusion_flutter_sliders: ^19.3.55
# searchable_dropdown: ^1.1.3
dropdown_search: 5.0.6
youtube_player_flutter: ^8.0.0
# Dep by Zohaib
shimmer: ^3.0.0
carousel_slider: ^4.0.0
# flutter_material_pickers: ^3.1.2
flutter_staggered_grid_view: ^0.7.0
# flutter_hms_gms_availability: ^2.0.0
huawei_hmsavailability: ^6.6.0+300
huawei_location: ^6.11.0+301
# Marker Animation
# flutter_animarker: ^3.2.0
auto_size_text: ^3.0.0
equatable: ^2.0.3
# signalr_core: ^1.1.1
wave: ^0.2.0
# sms_retriever: ^1.0.0
sms_otp_auto_verify: ^2.1.0
flutter_ios_voip_kit: ^0.1.0
google_api_availability: ^5.0.0
# open_file: ^3.2.1
open_filex: ^4.3.2
path_provider: ^2.0.8
logger: ^2.0.2+1
# flutter_callkit_incoming: ^1.0.3+3
# firebase_core: 1.12.0
# flutter_amazonpaymentservices: 0.0.6
# crypto:
dependency_overrides:
#provider: ^5.0.0
# permission_handler : ^10.2.0
#flutter_svg: ^1.1.6
# firebase_messaging_platform_interface: any
# flutter_inappwebview: 5.7.2+3
# git:
# url: https://github.com/CodeEagle/flutter_inappwebview
dev_dependencies:
flutter_test:
@ -240,7 +179,6 @@ dev_dependencies:
flutter:
uses-material-design: true
# assets:
assets:
- assets/
- assets/images/

Loading…
Cancel
Save