merge-update-with-lab-changes
devamirsaleemahmad 2 years ago
parent ed748a626b
commit cbc38940ea

@ -151,8 +151,8 @@ class BaseAppClient {
// body['IdentificationNo'] = 1023854217;
// body['MobileNo'] = "531940021";
body?['PatientID'] = 1231755; //3844083
body?['TokenID'] = "@dm!n";
// body?['PatientID'] = 1231755; //3844083
// body?['TokenID'] = "@dm!n";
// Patient ID: 3027574
// Mobile no.: 0502303285

@ -69,6 +69,9 @@ class _MyApp extends State<MyApp> {
//0537503378
//1231755
//2466305493
//0567184134 mobile
// checkForUpdate() {
// // todo need to verify 'imp'

@ -98,7 +98,7 @@ class _BookConfirmState extends State<BookConfirm> {
widget.doctor.projectName!,
null,
null,
widget.doctor.nationalityFlagURL!,
widget.doctor.nationalityFlagURL ?? "",
widget.doctor.doctorRate,
null,
widget.doctor.noOfPatientsRate,
@ -212,7 +212,7 @@ class _BookConfirmState extends State<BookConfirm> {
disabledBackgroundColor: new Color(0xFFbcc2c4).withOpacity(0.12),
elevation: 0,
onPressed: () async {
bool isLiveCareSchedule = await this.sharedPref.getBool(IS_LIVECARE_APPOINTMENT);
bool isLiveCareSchedule = await this.sharedPref.getBool(IS_LIVECARE_APPOINTMENT) ?? false;
if (isLiveCareSchedule != null && isLiveCareSchedule) {
insertLiveCareScheduledAppointment(context, widget.doctor);
} else {
@ -257,12 +257,12 @@ class _BookConfirmState extends State<BookConfirm> {
cancelAppointment(DoctorList docObject, AppoitmentAllHistoryResultList appo, BuildContext context) async {
ConfirmDialog.closeAlertDialog(context);
GifLoaderDialogUtils.showMyDialog(context);
DoctorsListService service = new DoctorsListService();
bool isLiveCareSchedule = await this.sharedPref.getBool(IS_LIVECARE_APPOINTMENT);
DoctorsListService service = DoctorsListService();
bool isLiveCareSchedule = await this.sharedPref.getBool(IS_LIVECARE_APPOINTMENT) ?? false;
service.cancelAppointment(appo, context, isReschedule: true).then((res) {
GifLoaderDialogUtils.hideDialog(context);
if (res['MessageStatus'] == 1) {
Future.delayed(new Duration(milliseconds: 1500), () async {
Future.delayed(Duration(milliseconds: 1500), () async {
if (isLiveCareSchedule != null && isLiveCareSchedule) {
insertLiveCareScheduledAppointment(context, widget.doctor);
} else {
@ -285,7 +285,7 @@ class _BookConfirmState extends State<BookConfirm> {
getPatientShare(context, appointmentNo, docObject.clinicID!, docObject.projectID!, docObject);
getToDoCount();
} else {
ConfirmDialog dialog = new ConfirmDialog(
ConfirmDialog dialog = ConfirmDialog(
isDissmissable: false,
context: context,
confirmMessage: res['ErrorEndUserMessage'],
@ -334,8 +334,7 @@ class _BookConfirmState extends State<BookConfirm> {
if (res['MessageStatus'] == 1) {
AppToast.showSuccessToast(message: TranslationBase.of(context).bookedSuccess);
Future.delayed(new Duration(milliseconds: 500), () {
Future.delayed(Duration(milliseconds: 500), () {
// checkPatientNphiesEligibility(docObject, res['AppointmentNo'], context);
getToDoCount();
getPatientShare(context, res['AppointmentNo'], docObject.clinicID!, docObject.projectID!, docObject);
@ -350,7 +349,7 @@ class _BookConfirmState extends State<BookConfirm> {
projectViewModel.analytics.appointment.book_appointment_confirmation_success(appointment_type: 'regular', dateTime: timeSlot!, doctor: widget.doctor);
} else {
GifLoaderDialogUtils.hideDialog(context);
appo = new AppoitmentAllHistoryResultList();
appo = AppoitmentAllHistoryResultList();
appo.appointmentNo = res['SameClinicApptList'][0]['AppointmentNo'];
appo.clinicID = res['SameClinicApptList'][0]['DoctorID'];
appo.projectID = res['SameClinicApptList'][0]['ProjectID'];
@ -362,13 +361,14 @@ class _BookConfirmState extends State<BookConfirm> {
appo.originalProjectID = 0;
appo.appointmentDate = res['SameClinicApptList'][0]['AppointmentDate'];
ConfirmDialog dialog = new ConfirmDialog(
context: context,
confirmMessage: res['ErrorEndUserMessage'],
okText: TranslationBase.of(context).confirm,
cancelText: TranslationBase.of(context).cancel_nocaps,
okFunction: () => {cancelAppointment(docObject, appo, context)},
cancelFunction: () => {});
ConfirmDialog dialog = ConfirmDialog(
context: context,
confirmMessage: res['ErrorEndUserMessage'],
okText: TranslationBase.of(context).confirm,
cancelText: TranslationBase.of(context).cancel_nocaps,
okFunction: () => {cancelAppointment(docObject, appo, context)},
cancelFunction: () => {},
);
dialog.showAlertDialog(context);
}
}).catchError((err) {
@ -382,10 +382,12 @@ class _BookConfirmState extends State<BookConfirm> {
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.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']);

@ -84,7 +84,7 @@ class _DocAvailableAppointmentsState extends State<DocAvailableAppointments> wit
WidgetsBinding.instance.addPostFrameCallback((_) async {
getCurrentLanguage();
isLiveCareSchedule = await this.sharedPref.getBool(IS_LIVECARE_APPOINTMENT);
isLiveCareSchedule = await this.sharedPref.getBool(IS_LIVECARE_APPOINTMENT) ?? false;
if (isLiveCareSchedule != null && isLiveCareSchedule)
getDoctorScheduledFreeSlots(context, widget.doctor);
else {
@ -471,7 +471,6 @@ class MeetingDataSource extends CalendarDataSource {
}
return meetingData;
}
}
class Meeting {

@ -106,7 +106,7 @@ class _SchedulePageState extends State<SchedulePage> {
Expanded(
flex: 1,
child: Padding(
padding: projectViewModel.isArabic ? EdgeInsets.only(right: 20) : EdgeInsets.only(left: 20),
padding: projectViewModel.isArabic ? EdgeInsets.only(right: 17) : EdgeInsets.only(left: 17),
child: Row(children: [
Column(
children: [

@ -650,7 +650,7 @@ class _LandingPageState extends State<LandingPage> with WidgetsBindingObserver {
: value['List_PatientDashboard'][0]['UnreadPatientNotificationCount'].toString();
model.setState(model.count, true, notificationCount);
sharedPref.setString(NOTIFICATION_COUNT, notificationCount);
FlutterAppIconBadge.updateBadge(int.parse(notificationCount));
FlutterAppIconBadge.updateBadge(int.parse(notificationCount.split("+").first));
}
}),
});

@ -53,13 +53,13 @@ class ConfirmLogin extends StatefulWidget {
class _ConfirmLogin extends State<ConfirmLogin> {
final LocalAuthentication auth = LocalAuthentication();
var _availableBiometrics;
var sharedPref = new AppSharedPreferences();
late bool authenticated;
final authService = new AuthProvider();
var sharedPref = AppSharedPreferences();
bool authenticated = false;
final authService = AuthProvider();
PharmacyModuleViewModel pharmacyModuleViewModel = locator<PharmacyModuleViewModel>();
late int mobileNumber;
String errorMsg = '';
late SelectDeviceIMEIRES user;
SelectDeviceIMEIRES user = SelectDeviceIMEIRES();
bool isLoading = false;
var registerd_data;
bool isMoreOption = false;
@ -84,7 +84,7 @@ class _ConfirmLogin extends State<ConfirmLogin> {
late bool _loading;
late int fingrePrintBefore;
int fingrePrintBefore = 0;
AuthenticatedUserObject authenticatedUserObject = locator<AuthenticatedUserObject>();
AppointmentRateViewModel appointmentRateViewModel = locator<AppointmentRateViewModel>();
@ -139,7 +139,7 @@ class _ConfirmLogin extends State<ConfirmLogin> {
style: TextStyle(fontSize: 12, fontWeight: FontWeight.w600, color: Color(0xff2B353E), letterSpacing: -0.64),
),
Text(
user.name!.toLowerCase().capitalizeFirstofEach,
user.name!.toLowerCase().capitalizeFirstofEach,
style: TextStyle(fontSize: 24, fontWeight: FontWeight.w700, color: Color(0xff2B353E), height: 1, letterSpacing: -1.44),
),
SizedBox(height: 10),
@ -632,7 +632,8 @@ class _ConfirmLogin extends State<ConfirmLogin> {
sharedPref.remove(FAMILY_FILE),
result.list.isFamily = false,
userData = result.list,
sharedPref.setString(BLOOD_TYPE, result.patientBloodType),
sharedPref.setString(BLOOD_TYPE, result.patientBloodType ?? "O+"),
//Remove o+ from here Added by Aamir
authenticatedUserObject.user = result.list,
projectViewModel.setPrivilege(privilegeList: res),
sharedPref.setObject(MAIN_USER, result.list),
@ -658,9 +659,9 @@ class _ConfirmLogin extends State<ConfirmLogin> {
}
})
.catchError((err) {
print(err);
GifLoaderDialogUtils.hideDialog(context);
Future.delayed(Duration(seconds: 1), () {
print(err);
AppToast.showErrorToast(message: err);
startSMSService(tempType);
});

@ -38,7 +38,7 @@ class _LaboratoryResultPageState extends State<LaboratoryResultPage> {
clinicID: widget.patientLabOrders!.clinicID!,
projectID: widget.patientLabOrders!.projectID!,
orderNo: widget.patientLabOrders!.orderNo!,
setupID: widget.patientLabOrders!.setupID!,
setupID: widget.patientLabOrders!.setupID ?? "0",
isVidaPlus: Utils.isVidaPlusProject(projectViewModel, int.parse(widget.patientLabOrders!.projectID!)),
),
builder: (_, model, w) => AppScaffold(

@ -4,6 +4,7 @@ import 'package:diplomaticquarterapp/core/model/prescriptions/prescription_repor
import 'package:diplomaticquarterapp/core/viewModels/medical/prescriptions_view_model.dart';
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/extensions/string_extensions.dart';
import 'package:diplomaticquarterapp/main.dart';
import 'package:diplomaticquarterapp/models/header_model.dart';
import 'package:diplomaticquarterapp/pages/base/base_view.dart';
import 'package:diplomaticquarterapp/pages/medical/prescriptions/prescription_details_inp.dart';
@ -29,7 +30,7 @@ class PrescriptionItemsPage extends StatelessWidget {
final Prescriptions prescriptions;
late ProjectViewModel projectViewModel;
PrescriptionItemsPage({ Key? key, required this.prescriptions});
PrescriptionItemsPage({Key? key, required this.prescriptions});
@override
Widget build(BuildContext context) {
@ -42,373 +43,379 @@ class PrescriptionItemsPage extends StatelessWidget {
baseViewModel: model,
showNewAppBar: true,
showNewAppBarTitle: true,
body: model.state != ViewState.Busy ? Column(
children: [
Expanded(
child: SingleChildScrollView(
physics: BouncingScrollPhysics(),
child: Column(
children: [
DoctorHeader(
headerModel: HeaderModel(
prescriptions.doctorName!,
prescriptions.doctorID!,
prescriptions.doctorImageURL!,
prescriptions.speciality ?? [""],
"",
prescriptions.name!,
DateUtil.convertStringToDate(prescriptions.appointmentDate!),
DateUtil.formatDateToTime(DateUtil.convertStringToDate(model.prescriptionReportEnhList.length > 0 ? model.prescriptionReportEnhList[0].orderDate! : model.prescriptionReportListINP[0].orderDate!)),
prescriptions.nationalityFlagURL!,
prescriptions.doctorRate,
prescriptions.actualDoctorRate,
prescriptions.noOfPatientsRate,
projectViewModel.user!.emailAddress!,
),
isNeedToShowButton: (model.prescriptionReportListINP.length > 0 || model.prescriptionReportEnhList.length > 0) ? projectViewModel.havePrivilege(13) : false,
showConfirmMessageDialog: false,
onTap: () {
showConfirmMessage(context, model);
},
),
if (!prescriptions.isInOutPatient!)
model.prescriptionReportListINP.length > 0
? ListView.separated(
itemBuilder: (context, index) {
return InkWell(
onTap: () {
Navigator.push(
context,
FadePage(
page: PrescriptionDetailsPageINP(
prescriptionReport: model.prescriptionReportListINP[index],
prescriptions: prescriptions,
),
),
);
},
child: Container(
width: double.infinity,
child: Container(
margin: EdgeInsets.only(left: 16, right: 16, top: index == 0 ? 16 : 4, bottom: 4),
decoration: cardRadius(12),
child: Padding(
padding: EdgeInsets.only(top: 12, bottom: 20, left: projectViewModel.isArabic ? 12 : 20, right: projectViewModel.isArabic ? 20 : 12),
child: Row(
children: [
Flexible(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
body: model.state != ViewState.Busy
? Column(
children: [
Expanded(
child: SingleChildScrollView(
physics: BouncingScrollPhysics(),
child: Column(
children: [
DoctorHeader(
headerModel: HeaderModel(
prescriptions.doctorName!,
prescriptions.doctorID!,
prescriptions.doctorImageURL!,
prescriptions.speciality ?? [""],
"",
prescriptions.name!,
DateUtil.convertStringToDate(prescriptions.appointmentDate!),
DateUtil.formatDateToTime(
DateUtil.convertStringToDate(
model.prescriptionReportEnhList.length > 0 ? model.prescriptionReportEnhList[0].orderDate! : model.prescriptionReportListINP[0].orderDate!,
),
),
prescriptions.nationalityFlagURL!,
prescriptions.doctorRate,
prescriptions.actualDoctorRate,
prescriptions.noOfPatientsRate,
projectViewModel.user.emailAddress!,
),
isNeedToShowButton: (model.prescriptionReportListINP.length > 0 || model.prescriptionReportEnhList.length > 0) ? projectViewModel.havePrivilege(13) : false,
showConfirmMessageDialog: false,
onTap: () {
showConfirmMessage(context, model);
},
),
if (!prescriptions.isInOutPatient!)
model.prescriptionReportListINP.length > 0
? ListView.separated(
itemBuilder: (context, index) {
return InkWell(
onTap: () {
Navigator.push(
context,
FadePage(
page: PrescriptionDetailsPageINP(
prescriptionReport: model.prescriptionReportListINP[index],
prescriptions: prescriptions,
),
),
);
},
child: Container(
width: double.infinity,
child: Container(
margin: EdgeInsets.only(left: 16, right: 16, top: index == 0 ? 16 : 4, bottom: 4),
decoration: cardRadius(12),
child: Padding(
padding: EdgeInsets.only(top: 12, bottom: 20, left: projectViewModel.isArabic ? 12 : 20, right: projectViewModel.isArabic ? 20 : 12),
child: Row(
children: [
Text(
model.prescriptionReportListINP[index].itemDescription!.isNotEmpty
? model.prescriptionReportListINP[index].itemDescription!
: model.prescriptionReportListINP[index].itemDescriptionN ?? '',
style: TextStyle(
fontSize: 16,
letterSpacing: -0.64,
fontWeight: FontWeight.w600,
),
),
mHeight(10),
Row(
children: [
// InkWell(
// child: Stack(
// alignment: Alignment.center,
// children: [
// Container(
// child: Image.network(
// model.prescriptionReportListINP[index].imageSRCUrl,
// fit: BoxFit.cover,
// width: 60,
// height: 60,
// ),
// margin: EdgeInsets.zero,
// clipBehavior: Clip.antiAlias,
// decoration: cardRadius(2000),
// ),
// Container(
// child: Icon(
// Icons.search,
// size: 18,
// color: Colors.white,
// ),
// padding: EdgeInsets.all(6),
// decoration: containerRadius(Colors.black.withOpacity(0.3), 200),
// )
// ],
// ),
// onTap: () {
// showZoomImageDialog(
// context,
// model.prescriptionReportListINP[index].imageSRCUrl,
// );
// },
// ),
// mWidth(12),
Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Row(
children: [
Text(
TranslationBase.of(context).route + ": ",
style: TextStyle(
color: Colors.grey,
fontSize: 10,
letterSpacing: -0.4,
fontWeight: FontWeight.w600,
),
),
Text(
model.prescriptionReportListINP[index].route!,
style: TextStyle(
fontSize: 12,
letterSpacing: -0.48,
fontWeight: FontWeight.w600,
),
),
],
Flexible(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
model.prescriptionReportListINP[index].itemDescription!.isNotEmpty
? model.prescriptionReportListINP[index].itemDescription!
: model.prescriptionReportListINP[index].itemDescriptionN ?? '',
style: TextStyle(
fontSize: 16,
letterSpacing: -0.64,
fontWeight: FontWeight.w600,
),
Row(
children: [
Text(
TranslationBase.of(context).dailyDoses + ": ",
style: TextStyle(
color: Colors.grey,
fontSize: 10,
letterSpacing: -0.4,
fontWeight: FontWeight.w600,
),
mHeight(10),
Row(
children: [
// InkWell(
// child: Stack(
// alignment: Alignment.center,
// children: [
// Container(
// child: Image.network(
// model.prescriptionReportListINP[index].imageSRCUrl,
// fit: BoxFit.cover,
// width: 60,
// height: 60,
// ),
// margin: EdgeInsets.zero,
// clipBehavior: Clip.antiAlias,
// decoration: cardRadius(2000),
// ),
// Container(
// child: Icon(
// Icons.search,
// size: 18,
// color: Colors.white,
// ),
// padding: EdgeInsets.all(6),
// decoration: containerRadius(Colors.black.withOpacity(0.3), 200),
// )
// ],
// ),
// onTap: () {
// showZoomImageDialog(
// context,
// model.prescriptionReportListINP[index].imageSRCUrl,
// );
// },
// ),
// mWidth(12),
Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Row(
children: [
Text(
TranslationBase.of(context).route + ": ",
style: TextStyle(
color: Colors.grey,
fontSize: 10,
letterSpacing: -0.4,
fontWeight: FontWeight.w600,
),
),
Text(
model.prescriptionReportListINP[index].route!,
style: TextStyle(
fontSize: 12,
letterSpacing: -0.48,
fontWeight: FontWeight.w600,
),
),
],
),
),
Text(
model.prescriptionReportListINP[index].doseDailyQuantity.toString(),
style: TextStyle(
fontSize: 12,
letterSpacing: -0.48,
fontWeight: FontWeight.w600,
Row(
children: [
Text(
TranslationBase.of(context).dailyDoses + ": ",
style: TextStyle(
color: Colors.grey,
fontSize: 10,
letterSpacing: -0.4,
fontWeight: FontWeight.w600,
),
),
Text(
model.prescriptionReportListINP[index].doseDailyQuantity.toString(),
style: TextStyle(
fontSize: 12,
letterSpacing: -0.48,
fontWeight: FontWeight.w600,
),
),
],
),
),
],
),
mHeight(12),
Text(
model.prescriptionReportListINP[index].remarks!,
style: TextStyle(
color: Colors.grey,
fontSize: 10,
letterSpacing: -0.4,
fontWeight: FontWeight.w600,
),
),
],
)
],
mHeight(12),
Text(
model.prescriptionReportListINP[index].remarks!,
style: TextStyle(
color: Colors.grey,
fontSize: 10,
letterSpacing: -0.4,
fontWeight: FontWeight.w600,
),
),
],
)
],
),
],
),
),
Icon(
Icons.arrow_forward,
size: 16,
),
],
),
),
Icon(
Icons.arrow_forward,
size: 16,
),
],
),
),
),
),
);
},
separatorBuilder: (context, index) {
return mHeight(8);
},
physics: NeverScrollableScrollPhysics(),
shrinkWrap: true,
itemCount: model.prescriptionReportListINP.length)
: Padding(
padding: const EdgeInsets.only(top: 150.0),
child: getNoDataWidget(context),
)
else
model.prescriptionReportEnhList.length > 0
? ListView.separated(
padding: EdgeInsets.all(21),
itemBuilder: (context, index) {
return InkWell(
onTap: () {
PrescriptionReport prescriptionReport = PrescriptionReport(
imageSRCUrl: model.prescriptionReportEnhList[index].imageSRCUrl,
itemDescription: model.prescriptionReportEnhList[index].itemDescription,
itemDescriptionN: model.prescriptionReportEnhList[index].itemDescription,
routeN: model.prescriptionReportEnhList[index].route,
frequency: model.prescriptionReportEnhList[index].frequency,
frequencyN: model.prescriptionReportEnhList[index].frequency,
doseDailyQuantity: model.prescriptionReportEnhList[index].doseDailyQuantity,
days: model.prescriptionReportEnhList[index].days,
itemID: model.prescriptionReportEnhList[index].itemID,
orderDate: model.prescriptionReportEnhList[index].orderDate,
startDate: model.prescriptionReportEnhList[index].startDate,
remarks: model.prescriptionReportEnhList[index].remarks);
Navigator.push(
context,
FadePage(
page: PrescriptionDetailsPage(
prescriptionReport: prescriptionReport,
prescriptions: prescriptions,
),
),
);
},
child: Container(
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.all(
Radius.circular(10.0),
),
boxShadow: [
BoxShadow(
color: Color(0xff000000).withOpacity(.05),
blurRadius: 27,
offset: Offset(0, -3),
),
),
],
),
child: Padding(
padding: EdgeInsets.only(top: 12, bottom: 20, left: projectViewModel.isArabic ? 12 : 20, right: projectViewModel.isArabic ? 20 : 12),
child: Row(
children: [
Flexible(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
);
},
separatorBuilder: (context, index) {
return mHeight(8);
},
physics: NeverScrollableScrollPhysics(),
shrinkWrap: true,
itemCount: model.prescriptionReportListINP.length)
: Padding(
padding: const EdgeInsets.only(top: 150.0),
child: getNoDataWidget(context),
)
else
model.prescriptionReportEnhList.length > 0
? ListView.separated(
padding: EdgeInsets.all(21),
itemBuilder: (context, index) {
return InkWell(
onTap: () {
PrescriptionReport prescriptionReport = PrescriptionReport(
imageSRCUrl: model.prescriptionReportEnhList[index].imageSRCUrl,
itemDescription: model.prescriptionReportEnhList[index].itemDescription,
itemDescriptionN: model.prescriptionReportEnhList[index].itemDescription,
routeN: model.prescriptionReportEnhList[index].route,
frequency: model.prescriptionReportEnhList[index].frequency,
frequencyN: model.prescriptionReportEnhList[index].frequency,
doseDailyQuantity: model.prescriptionReportEnhList[index].doseDailyQuantity,
days: model.prescriptionReportEnhList[index].days,
itemID: model.prescriptionReportEnhList[index].itemID,
orderDate: model.prescriptionReportEnhList[index].orderDate,
startDate: model.prescriptionReportEnhList[index].startDate,
remarks: model.prescriptionReportEnhList[index].remarks);
Navigator.push(
context,
FadePage(
page: PrescriptionDetailsPage(
prescriptionReport: prescriptionReport,
prescriptions: prescriptions,
),
),
);
},
child: Container(
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.all(
Radius.circular(10.0),
),
boxShadow: [
BoxShadow(
color: Color(0xff000000).withOpacity(.05),
blurRadius: 27,
offset: Offset(0, -3),
),
],
),
child: Padding(
padding: EdgeInsets.only(top: 12, bottom: 20, left: projectViewModel.isArabic ? 12 : 20, right: projectViewModel.isArabic ? 20 : 12),
child: Row(
children: [
Text(
(model.prescriptionReportEnhList[index].itemDescription!.isNotEmpty
? model.prescriptionReportEnhList[index].itemDescription
: model.prescriptionReportEnhList[index].itemDescriptionN ?? '')
!.toLowerCase()
.capitalizeFirstofEach,
style: TextStyle(
fontSize: 16,
color: Color(0xff2E303A),
letterSpacing: -0.64,
fontWeight: FontWeight.w600,
),
),
mHeight(10),
Row(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
// InkWell(
// child: Stack(
// alignment: Alignment.center,
// children: [
// Container(
// child: Image.network(
// model.prescriptionReportEnhList[index].imageSRCUrl,
// fit: BoxFit.cover,
// width: 60,
// height: 60,
// ),
// margin: EdgeInsets.zero,
// clipBehavior: Clip.antiAlias,
// decoration: cardRadius(2000),
// ),
// Container(
// child: Icon(
// Icons.search,
// size: 18,
// color: Colors.white,
// ),
// padding: EdgeInsets.all(6),
// decoration: containerRadius(Colors.black.withOpacity(0.3), 200),
// )
// ],
// ),
// onTap: () {
// showZoomImageDialog(
// context,
// model.prescriptionReportEnhList[index].imageSRCUrl,
// );
// },
// ),
// mWidth(12),
Expanded(
child: Column(
Flexible(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
(model.prescriptionReportEnhList[index].itemDescription!.isNotEmpty
? model.prescriptionReportEnhList[index].itemDescription
: model.prescriptionReportEnhList[index].itemDescriptionN ?? '')!
.toLowerCase()
.capitalizeFirstofEach,
style: TextStyle(
fontSize: 16,
color: Color(0xff2E303A),
letterSpacing: -0.64,
fontWeight: FontWeight.w600,
),
),
mHeight(10),
Row(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
MyRichText(TranslationBase.of(context).route + ": ", model.prescriptionReportEnhList[index].route!, projectViewModel.isArabic),
MyRichText(TranslationBase.of(context).dailyDoses + ": ", model.prescriptionReportEnhList[index].doseDailyQuantity.toString(),
projectViewModel.isArabic),
mHeight(9),
Text(
model.prescriptionReportEnhList[index].remarks!,
style: TextStyle(
color: Color(0xff575757),
fontSize: 12,
letterSpacing: -0.4,
fontWeight: FontWeight.w600,
// InkWell(
// child: Stack(
// alignment: Alignment.center,
// children: [
// Container(
// child: Image.network(
// model.prescriptionReportEnhList[index].imageSRCUrl,
// fit: BoxFit.cover,
// width: 60,
// height: 60,
// ),
// margin: EdgeInsets.zero,
// clipBehavior: Clip.antiAlias,
// decoration: cardRadius(2000),
// ),
// Container(
// child: Icon(
// Icons.search,
// size: 18,
// color: Colors.white,
// ),
// padding: EdgeInsets.all(6),
// decoration: containerRadius(Colors.black.withOpacity(0.3), 200),
// )
// ],
// ),
// onTap: () {
// showZoomImageDialog(
// context,
// model.prescriptionReportEnhList[index].imageSRCUrl,
// );
// },
// ),
// mWidth(12),
Expanded(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
MyRichText(TranslationBase.of(context).route + ": ", model.prescriptionReportEnhList[index].route!, projectViewModel.isArabic),
MyRichText(TranslationBase.of(context).dailyDoses + ": ", model.prescriptionReportEnhList[index].doseDailyQuantity.toString(),
projectViewModel.isArabic),
mHeight(9),
Text(
model.prescriptionReportEnhList[index].remarks!,
style: TextStyle(
color: Color(0xff575757),
fontSize: 12,
letterSpacing: -0.4,
fontWeight: FontWeight.w600,
),
),
],
),
),
)
],
),
)
],
],
),
),
Icon(
Icons.arrow_forward,
size: 16,
),
],
),
),
Icon(
Icons.arrow_forward,
size: 16,
),
],
),
),
),
);
},
separatorBuilder: (context, index) {
return mHeight(12);
},
shrinkWrap: true,
physics: NeverScrollableScrollPhysics(),
itemCount: model.prescriptionReportEnhList.length)
: Padding(
padding: const EdgeInsets.only(top: 150.0),
child: getNoDataWidget(context),
),
);
},
separatorBuilder: (context, index) {
return mHeight(12);
},
shrinkWrap: true,
physics: NeverScrollableScrollPhysics(),
itemCount: model.prescriptionReportEnhList.length)
: Padding(
padding: const EdgeInsets.only(top: 150.0),
child: getNoDataWidget(context),
),
],
),
),
),
Container(
color: Colors.white,
padding: EdgeInsets.only(top: 16, bottom: 16, right: 21, left: 21),
child: DefaultButton(
TranslationBase.of(context).resendOrder,
() {
if (model.isMedDeliveryAllowed == false) {
AppToast.showErrorToast(message: TranslationBase.of(context).prescriptionDeliveryError);
} else {
Navigator.push(
context,
FadePage(
page: PrescriptionDeliveryAddressPage(
prescriptions: prescriptions,
prescriptionReportList: model.prescriptionReportList,
prescriptionReportEnhList: model.prescriptionReportEnhList,
),
],
),
);
}
},
color: model.isMedDeliveryAllowed == false ? Color(0xff575757) : Color(0xff359846),
disabledColor: Color(0xff575757),
),
),
],
) : Container(),
),
),
Container(
color: Colors.white,
padding: EdgeInsets.only(top: 16, bottom: 16, right: 21, left: 21),
child: DefaultButton(
TranslationBase.of(context).resendOrder,
() {
if (model.isMedDeliveryAllowed == false) {
AppToast.showErrorToast(message: TranslationBase.of(context).prescriptionDeliveryError);
} else {
Navigator.push(
context,
FadePage(
page: PrescriptionDeliveryAddressPage(
prescriptions: prescriptions,
prescriptionReportList: model.prescriptionReportList,
prescriptionReportEnhList: model.prescriptionReportEnhList,
),
),
);
}
},
color: model.isMedDeliveryAllowed == false ? Color(0xff575757) : Color(0xff359846),
disabledColor: Color(0xff575757),
),
),
],
)
: Container(),
),
);
}

@ -14,7 +14,7 @@ import '../show_zoom_image_dialog.dart';
/// [height] the avatar height
/// [onTap] on tap function
class LargeAvatar extends StatelessWidget {
LargeAvatar({Key? key, this.name, this.url, this.disableProfileView= false, this.radius = 70.0, this.width = 70, this.height = 60, this.onTap, this.isAppointmentAvatar= false}) : super(key: key);
LargeAvatar({Key? key, this.name, this.url, this.disableProfileView = false, this.radius = 70.0, this.width = 70, this.height = 60, this.onTap, this.isAppointmentAvatar = false}) : super(key: key);
final String? name;
final String? url;
@ -41,7 +41,11 @@ class LargeAvatar extends StatelessWidget {
),
if (!disableProfileView && !isAppointmentAvatar)
Container(
child: Icon(Icons.search,size: 18,color: Colors.white,),
child: Icon(
Icons.search,
size: 18,
color: Colors.white,
),
padding: EdgeInsets.all(6),
decoration: containerRadius(Colors.black.withOpacity(0.3), 200),
)
@ -63,10 +67,11 @@ class LargeAvatar extends StatelessWidget {
return InkWell(
onTap: disableProfileView
? null
: isAppointmentAvatar ? onTap : () {
print("ssssss " + url!.trim());
showZoomImageDialog(context, url!.trim() ?? "");
},
: isAppointmentAvatar
? onTap
: () {
showZoomImageDialog(context, url!.trim() ?? "");
},
child: Container(
decoration: BoxDecoration(
// gradient: LinearGradient(

@ -36,7 +36,8 @@ class _LaboratoryResultWidgetState extends State<LaboratoryResultWidget> {
Widget build(BuildContext context) {
projectViewModel = Provider.of(context);
return BaseView<LabsViewModel>(
onModelReady: (model) => model.getPatientLabResult(isVidaPlus: Utils.isVidaPlusProject(projectViewModel, int.parse(widget.patientLabOrder!.projectID!)), patientLabOrder: widget.patientLabOrder!),
onModelReady: (model) =>
model.getPatientLabResult(isVidaPlus: Utils.isVidaPlusProject(projectViewModel, int.parse(widget.patientLabOrder!.projectID!)), patientLabOrder: widget.patientLabOrder!),
builder: (_, model, w) => NetworkBaseView(
baseViewModel: model,
child: Column(
@ -45,7 +46,7 @@ class _LaboratoryResultWidgetState extends State<LaboratoryResultWidget> {
DoctorHeader(
headerModel: HeaderModel(
widget.patientLabOrder!.doctorName!,
widget.patientLabOrder!.doctorID!,
widget.patientLabOrder!.doctorID ?? 0,
widget.patientLabOrder!.doctorImageURL!,
widget.patientLabOrder!.speciality ?? [""],
widget.billNo!,
@ -56,7 +57,7 @@ class _LaboratoryResultWidgetState extends State<LaboratoryResultWidget> {
widget.patientLabOrder!.doctorRate!,
widget.patientLabOrder!.actualDoctorRate!,
widget.patientLabOrder!.noOfPatientsRate!,
projectViewModel.user!.emailAddress!),
projectViewModel.user.emailAddress!),
onTap: widget.onTap!,
),
SizedBox(height: 10),

@ -16,7 +16,7 @@ class ConfirmDialog {
final Function? cancelFunction;
final isDissmissable;
ConfirmDialog({@required this.context, this.title, @required this.confirmMessage, @required this.okText, @required this.cancelText, required this.okFunction, @required this.cancelFunction, this.isDissmissable = true});
ConfirmDialog({required this.context, this.title, required this.confirmMessage, required this.okText, required this.cancelText, required this.okFunction, required this.cancelFunction, this.isDissmissable = true});
showAlertDialog(BuildContext context) {
Dialog alert = Dialog(
@ -28,8 +28,8 @@ class ConfirmDialog {
confirmMessage,
okText,
cancelText,
cancelFunction: cancelFunction!,
okFunction: okFunction!,
cancelFunction: cancelFunction,
okFunction: okFunction,
),
),
);

@ -8,6 +8,7 @@ import 'package:diplomaticquarterapp/uitl/date_uitl.dart';
import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/widgets/avatar/large_avatar.dart';
import 'package:diplomaticquarterapp/widgets/buttons/defaultButton.dart';
import 'package:diplomaticquarterapp/widgets/dialogs/confirm_send_email_dialog.dart';
import 'package:diplomaticquarterapp/widgets/my_rich_text.dart';
import 'package:flutter/material.dart';
@ -41,7 +42,7 @@ class DoctorHeader extends StatelessWidget {
@override
Widget build(BuildContext context) {
String _speciality = (headerModel?.speciality ?? []).length > 0 ? headerModel!.speciality.first : "";
String _speciality = (headerModel.speciality ?? []).length > 0 ? headerModel.speciality.first : "";
projectViewModel = Provider.of(context);
return Container(
color: Colors.white,
@ -53,7 +54,7 @@ class DoctorHeader extends StatelessWidget {
Padding(
padding: EdgeInsets.only(left: 21, right: 21, bottom: 12),
child: Text(
headerModel!.doctorName!,
headerModel.doctorName,
maxLines: 1,
style: TextStyle(
fontSize: 24, fontFamily: (projectViewModel.isArabic ? 'Cairo' : 'Poppins'), fontWeight: FontWeight.w700, color: Color(0xff2B353E), letterSpacing: -1.44, height: 35 / 24),
@ -66,13 +67,15 @@ class DoctorHeader extends StatelessWidget {
crossAxisAlignment: CrossAxisAlignment.start,
children: [
LargeAvatar(
name: headerModel!.doctorName,
url: headerModel!.doctorImageURL,
name: headerModel.doctorName,
url: headerModel.doctorImageURL,
width: 51,
height: 51,
disableProfileView: headerModel.doctorImageURL.isEmpty && headerModel.doctorImageURL == null ? true : false,
),
SizedBox(width: 10),
Expanded(
flex: 4,
child: Column(
mainAxisSize: MainAxisSize.min,
crossAxisAlignment: CrossAxisAlignment.start,
@ -101,10 +104,10 @@ class DoctorHeader extends StatelessWidget {
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)
if (headerModel.nationalityFlagURL != null)
Padding(
padding: const EdgeInsets.only(top: 8.0),
child: Image.network(headerModel.nationalityFlagURL ?? "", height: 20),
child: headerModel.nationalityFlagURL.isNotEmpty && headerModel.nationalityFlagURL != null ? Image.network(headerModel.nationalityFlagURL, height: 20) : SizedBox(),
),
],
)
@ -291,25 +294,26 @@ class DoctorHeader extends StatelessWidget {
// filledIcon: Icons.star,
// emptyIcon: Icons.star,
// ),
RatingBar(
itemSize: 20.0,
allowHalfRating: true,
initialRating: this.headerModel!.decimalDoctorRate! != null ? double.tryParse(this.headerModel!.decimalDoctorRate!)! : this.headerModel!.actualDoctorRate!.toDouble(),
ratingWidget: RatingWidget(
full: Icon(
Icons.star,
color: Color(0XFFD02127),
),
half: Icon(
Icons.star_half,
color: Color(0XFFD02127),
),
empty: Icon(
Icons.star_border,
color: Color(0XFFD02127),
),
),
onRatingUpdate: (double value) {}),
RatingBar(
itemSize: 20.0,
allowHalfRating: true,
initialRating:
this.headerModel!.decimalDoctorRate! != null ? double.tryParse(this.headerModel!.decimalDoctorRate!)! : this.headerModel!.actualDoctorRate!.toDouble(),
ratingWidget: RatingWidget(
full: Icon(
Icons.star,
color: Color(0XFFD02127),
),
half: Icon(
Icons.star_half,
color: Color(0XFFD02127),
),
empty: Icon(
Icons.star_border,
color: Color(0XFFD02127),
),
),
onRatingUpdate: (double value) {}),
// RatingBar(
// initialRating: this.headerModel!.decimalDoctorRate! != null ? double.tryParse(this.headerModel!.decimalDoctorRate!)! : this.headerModel!.actualDoctorRate!.toDouble(),
// //size: 15.0,

@ -23,7 +23,7 @@ class ProvidedPinBoxTextAnimation {
class OTPWidget extends StatefulWidget {
final int maxLength;
late TextEditingController? controller;
late TextEditingController? controller;
final Color defaultBorderColor;
final Color pinBoxColor;
@ -47,7 +47,7 @@ class OTPWidget extends StatefulWidget {
final TextInputType keyboardType;
final EdgeInsets pinBoxOuterPadding;
OTPWidget({
OTPWidget({
Key? key,
this.maxLength = 4,
this.controller,
@ -58,14 +58,14 @@ class OTPWidget extends StatefulWidget {
this.defaultBorderColor = Colors.black,
this.textBorderColor = Colors.black,
this.pinTextAnimatedSwitcherTransition,
this.pinTextAnimatedSwitcherDuration= const Duration(),
this.hasError= false,
this.errorBorderColor= Colors.red,
this.pinTextAnimatedSwitcherDuration = const Duration(),
this.hasError = false,
this.errorBorderColor = Colors.red,
this.onTextChanged,
this.autoFocus= false,
this.autoFocus = false,
this.focusNode,
this.textDirection= TextDirection.ltr,
this.keyboardType= TextInputType.number,
this.textDirection = TextDirection.ltr,
this.keyboardType = TextInputType.number,
this.pinBoxOuterPadding = const EdgeInsets.symmetric(horizontal: 4.0),
this.pinBoxColor = Colors.white,
this.pinBoxBorderWidth = 2.0,
@ -80,7 +80,7 @@ class OTPWidget extends StatefulWidget {
}
class OTPWidgetState extends State<OTPWidget> with SingleTickerProviderStateMixin {
late AnimationController _highlightAnimationController;
late AnimationController _highlightAnimationController;
late FocusNode focusNode;
String text = "";
int currentIndex = 0;
@ -121,11 +121,11 @@ class OTPWidgetState extends State<OTPWidget> with SingleTickerProviderStateMixi
void initState() {
super.initState();
focusNode = widget.focusNode ?? FocusNode();
_highlightAnimationController = AnimationController(vsync: this);
_initTextController();
_calculateStrList();
widget.controller?.addListener(_controllerListener);
focusNode?.addListener(_focusListener);
widget.controller!.addListener(_controllerListener);
focusNode.addListener(_focusListener);
}
void _controllerListener() {
@ -182,11 +182,11 @@ class OTPWidgetState extends State<OTPWidget> with SingleTickerProviderStateMixi
@override
void dispose() {
if (widget.focusNode == null) {
focusNode?.dispose();
focusNode.dispose();
} else {
focusNode?.removeListener(_focusListener);
focusNode.removeListener(_focusListener);
}
_highlightAnimationController?.dispose();
_highlightAnimationController.dispose();
widget.controller?.removeListener(_controllerListener);
super.dispose();
@ -295,7 +295,11 @@ class OTPWidgetState extends State<OTPWidget> with SingleTickerProviderStateMixi
List<Widget> pinCodes = List.generate(widget.maxLength, (int i) {
return _buildPinCode(i, context);
});
return Row(children: pinCodes, mainAxisSize: MainAxisSize.min,mainAxisAlignment: MainAxisAlignment.spaceBetween,);
return Row(
children: pinCodes,
mainAxisSize: MainAxisSize.min,
mainAxisAlignment: MainAxisAlignment.spaceBetween,
);
}
Widget _buildPinCode(int i, BuildContext context) {

Loading…
Cancel
Save