flutter version 2

hussam_flutter_2
hussam al-habibeh 4 years ago
parent f53920d040
commit 7d3e59e060

@ -141,9 +141,7 @@ class PatientRegistrationViewModel extends BaseViewModel {
setState(ViewState.Idle); setState(ViewState.Idle);
} }
Future sendActivationCodeByOTPNotificationType( Future sendActivationCodeByOTPNotificationType({required int otpType}) async {
{
required int otpType}) async {
setState(ViewState.BusyLocal); setState(ViewState.BusyLocal);
print(checkPatientForRegistrationModel); print(checkPatientForRegistrationModel);
print(checkPatientForRegistrationModel); print(checkPatientForRegistrationModel);
@ -181,7 +179,7 @@ class PatientRegistrationViewModel extends BaseViewModel {
channel: 3, channel: 3,
// TODO Elham* loginType // TODO Elham* loginType
loginType: 4, loginType: 4,
logInTokenID:_patientRegistrationService.logInTokenID , logInTokenID: _patientRegistrationService.logInTokenID,
nationalID: checkPatientForRegistrationModel.patientIdentificationID, nationalID: checkPatientForRegistrationModel.patientIdentificationID,
patientID: 0, patientID: 0,
mobileNo: checkPatientForRegistrationModel.patientMobileNumber.toString(), mobileNo: checkPatientForRegistrationModel.patientMobileNumber.toString(),

@ -33,41 +33,77 @@ class ProfileGridForOther extends StatelessWidget {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
final List<PatientProfileCardModel> cardsList = [ final List<PatientProfileCardModel> cardsList = [
PatientProfileCardModel(TranslationBase.of(context).vital!, TranslationBase.of(context).signs!, VITAL_SIGN_DETAILS, 'patient/vital_signs.png', PatientProfileCardModel(
TranslationBase.of(context).vital!,
TranslationBase.of(context).signs!,
VITAL_SIGN_DETAILS,
'patient/vital_signs.png',
isInPatient: isInpatient), isInPatient: isInpatient),
PatientProfileCardModel( PatientProfileCardModel(
TranslationBase.of(context).lab!, TranslationBase.of(context).result!, LAB_RESULT, 'patient/lab_results.png', TranslationBase.of(context).lab!,
TranslationBase.of(context).result!,
LAB_RESULT,
'patient/lab_results.png',
isInPatient: isInpatient), isInPatient: isInpatient),
PatientProfileCardModel(TranslationBase.of(context).lab!, TranslationBase.of(context).special!, PatientProfileCardModel(
ALL_SPECIAL_LAB_RESULT, 'patient/lab_results.png', TranslationBase.of(context).lab!,
TranslationBase.of(context).special!,
ALL_SPECIAL_LAB_RESULT,
'patient/lab_results.png',
isInPatient: isInpatient), isInPatient: isInpatient),
PatientProfileCardModel(TranslationBase.of(context).radiology!, TranslationBase.of(context).service!, PatientProfileCardModel(
RADIOLOGY_PATIENT, 'patient/health_summary.png', TranslationBase.of(context).radiology!,
TranslationBase.of(context).service!,
RADIOLOGY_PATIENT,
'patient/health_summary.png',
isInPatient: isInpatient), isInPatient: isInpatient),
PatientProfileCardModel(TranslationBase.of(context).orders!, TranslationBase.of(context).prescription!, PatientProfileCardModel(
ORDER_PRESCRIPTION_NEW, 'patient/order_prescription.png', TranslationBase.of(context).orders!,
TranslationBase.of(context).prescription!,
ORDER_PRESCRIPTION_NEW,
'patient/order_prescription.png',
isInPatient: isInpatient), isInPatient: isInpatient),
PatientProfileCardModel(TranslationBase.of(context).health!, TranslationBase.of(context).summary!, HEALTH_SUMMARY, PatientProfileCardModel(
TranslationBase.of(context).health!,
TranslationBase.of(context).summary!,
HEALTH_SUMMARY,
'patient/health_summary.png', 'patient/health_summary.png',
isInPatient: isInpatient), isInPatient: isInpatient),
PatientProfileCardModel(TranslationBase.of(context).patient!, "ECG", PATIENT_ECG, 'patient/patient_sick_leave.png', PatientProfileCardModel(TranslationBase.of(context).patient!, "ECG",
PATIENT_ECG, 'patient/patient_sick_leave.png',
isInPatient: isInpatient), isInPatient: isInpatient),
PatientProfileCardModel(TranslationBase.of(context).orders!, TranslationBase.of(context).procedures!, PatientProfileCardModel(
ORDER_PROCEDURE, 'patient/Order_Procedures.png', TranslationBase.of(context).orders!,
TranslationBase.of(context).procedures!,
ORDER_PROCEDURE,
'patient/Order_Procedures.png',
isInPatient: isInpatient), isInPatient: isInpatient),
PatientProfileCardModel(TranslationBase.of(context).insurance!, TranslationBase.of(context).service!, PatientProfileCardModel(
PATIENT_INSURANCE_APPROVALS_NEW, 'patient/vital_signs.png', TranslationBase.of(context).insurance!,
TranslationBase.of(context).service!,
PATIENT_INSURANCE_APPROVALS_NEW,
'patient/vital_signs.png',
isInPatient: isInpatient), isInPatient: isInpatient),
PatientProfileCardModel(TranslationBase.of(context).patientSick!, TranslationBase.of(context).leave!, ADD_SICKLEAVE, 'patient/patient_sick_leave.png', PatientProfileCardModel(
TranslationBase.of(context).patientSick!,
TranslationBase.of(context).leave!,
ADD_SICKLEAVE,
'patient/patient_sick_leave.png',
isInPatient: isInpatient), isInPatient: isInpatient),
if (isFromLiveCare || (patient.appointmentNo != null && patient.appointmentNo != 0)) if (isFromLiveCare ||
PatientProfileCardModel(TranslationBase.of(context).patient!, TranslationBase.of(context).ucaf!, (patient.appointmentNo != null && patient.appointmentNo != 0))
PATIENT_UCAF_REQUEST, 'patient/ucaf.png', PatientProfileCardModel(
TranslationBase.of(context).patient!,
TranslationBase.of(context).ucaf!,
PATIENT_UCAF_REQUEST,
'patient/ucaf.png',
isInPatient: isInpatient, isInPatient: isInpatient,
isDisable: isFromLiveCare isDisable: isFromLiveCare
? patient.appointmentNo == null ? patient.appointmentNo == null
: patient.patientStatusType != 43 || patient.appointmentNo == null), : patient.patientStatusType != 43 ||
if (isFromLiveCare || (patient.appointmentNo != null && patient.appointmentNo != 0)) patient.appointmentNo == null),
if (isFromLiveCare ||
(patient.appointmentNo != null && patient.appointmentNo != 0))
PatientProfileCardModel( PatientProfileCardModel(
TranslationBase.of(context).referral!, TranslationBase.of(context).referral!,
TranslationBase.of(context).patient!, TranslationBase.of(context).patient!,
@ -76,15 +112,21 @@ class ProfileGridForOther extends StatelessWidget {
isInPatient: isInpatient, isInPatient: isInpatient,
isDisable: isFromLiveCare isDisable: isFromLiveCare
? patient.appointmentNo == null ? patient.appointmentNo == null
: patient.patientStatusType != 43 || patient.appointmentNo == null, : patient.patientStatusType != 43 ||
patient.appointmentNo == null,
), ),
if (isFromLiveCare || (patient.appointmentNo != null && patient.appointmentNo != 0)) if (isFromLiveCare ||
PatientProfileCardModel(TranslationBase.of(context).admission!, TranslationBase.of(context).request!, (patient.appointmentNo != null && patient.appointmentNo != 0))
PATIENT_ADMISSION_REQUEST, 'patient/admission_req.png', PatientProfileCardModel(
TranslationBase.of(context).admission!,
TranslationBase.of(context).request!,
PATIENT_ADMISSION_REQUEST,
'patient/admission_req.png',
isInPatient: isInpatient, isInPatient: isInpatient,
isDisable: isFromLiveCare isDisable: isFromLiveCare
? patient.appointmentNo == null ? patient.appointmentNo == null
: patient.patientStatusType != 43 || patient.appointmentNo == null), : patient.patientStatusType != 43 ||
patient.appointmentNo == null),
]; ];
return Column( return Column(
@ -99,22 +141,23 @@ class ProfileGridForOther extends StatelessWidget {
crossAxisCount: 3, crossAxisCount: 3,
itemCount: cardsList.length, itemCount: cardsList.length,
staggeredTileBuilder: (int index) => StaggeredTile.fit(1), staggeredTileBuilder: (int index) => StaggeredTile.fit(1),
itemBuilder: (BuildContext context, int index) => PatientProfileButton( itemBuilder: (BuildContext context, int index) =>
patient: patient, PatientProfileButton(
patientType: patientType, patient: patient,
arrivalType: arrivalType, patientType: patientType,
from: from, arrivalType: arrivalType,
to: to, from: from,
nameLine1: cardsList[index].nameLine1, to: to,
nameLine2: cardsList[index].nameLine2, nameLine1: cardsList[index].nameLine1,
route: cardsList[index].route, nameLine2: cardsList[index].nameLine2,
icon: cardsList[index].icon, route: cardsList[index].route,
isInPatient: cardsList[index].isInPatient, icon: cardsList[index].icon,
isDischargedPatient: cardsList[index].isDischargedPatient, isInPatient: cardsList[index].isInPatient,
isDisable: cardsList[index].isDisable, isDischargedPatient: cardsList[index].isDischargedPatient,
onTap: cardsList[index].onTap, isDisable: cardsList[index].isDisable,
isLoading: cardsList[index].isLoading, onTap: cardsList[index].onTap,
isFromLiveCare: isFromLiveCare), isLoading: cardsList[index].isLoading,
isFromLiveCare: isFromLiveCare),
), ),
), ),
], ],

@ -30,45 +30,87 @@ class ProfileGridForSearch extends StatelessWidget {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
final List<PatientProfileCardModel> cardsList = [ final List<PatientProfileCardModel> cardsList = [
PatientProfileCardModel(TranslationBase.of(context).vital!, TranslationBase.of(context).signs!, VITAL_SIGN_DETAILS, 'patient/vital_signs.png', PatientProfileCardModel(
TranslationBase.of(context).vital!,
TranslationBase.of(context).signs!,
VITAL_SIGN_DETAILS,
'patient/vital_signs.png',
isInPatient: isInpatient), isInPatient: isInpatient),
PatientProfileCardModel( PatientProfileCardModel(
TranslationBase.of(context).lab!, TranslationBase.of(context).result!, LAB_RESULT, 'patient/lab_results.png', TranslationBase.of(context).lab!,
TranslationBase.of(context).result!,
LAB_RESULT,
'patient/lab_results.png',
isInPatient: isInpatient), isInPatient: isInpatient),
PatientProfileCardModel(TranslationBase.of(context).lab!, TranslationBase.of(context).special!, PatientProfileCardModel(
ALL_SPECIAL_LAB_RESULT, 'patient/lab_results.png', TranslationBase.of(context).lab!,
TranslationBase.of(context).special!,
ALL_SPECIAL_LAB_RESULT,
'patient/lab_results.png',
isInPatient: isInpatient), isInPatient: isInpatient),
PatientProfileCardModel(TranslationBase.of(context).radiology!, TranslationBase.of(context).service!, PatientProfileCardModel(
RADIOLOGY_PATIENT, 'patient/health_summary.png', TranslationBase.of(context).radiology!,
TranslationBase.of(context).service!,
RADIOLOGY_PATIENT,
'patient/health_summary.png',
isInPatient: isInpatient), isInPatient: isInpatient),
PatientProfileCardModel(TranslationBase.of(context).orders!, TranslationBase.of(context).prescription!, PatientProfileCardModel(
ORDER_PRESCRIPTION_NEW, 'patient/order_prescription.png', TranslationBase.of(context).orders!,
TranslationBase.of(context).prescription!,
ORDER_PRESCRIPTION_NEW,
'patient/order_prescription.png',
isInPatient: isInpatient), isInPatient: isInpatient),
PatientProfileCardModel(TranslationBase.of(context).health!, TranslationBase.of(context).summary!, HEALTH_SUMMARY, PatientProfileCardModel(
TranslationBase.of(context).health!,
TranslationBase.of(context).summary!,
HEALTH_SUMMARY,
'patient/health_summary.png', 'patient/health_summary.png',
isInPatient: isInpatient), isInPatient: isInpatient),
PatientProfileCardModel(TranslationBase.of(context).patient!, "ECG", PATIENT_ECG, 'patient/patient_sick_leave.png', PatientProfileCardModel(TranslationBase.of(context).patient!, "ECG",
PATIENT_ECG, 'patient/patient_sick_leave.png',
isInPatient: isInpatient), isInPatient: isInpatient),
PatientProfileCardModel(TranslationBase.of(context).orders!, TranslationBase.of(context).procedures!, PatientProfileCardModel(
ORDER_PROCEDURE, 'patient/Order_Procedures.png', TranslationBase.of(context).orders!,
TranslationBase.of(context).procedures!,
ORDER_PROCEDURE,
'patient/Order_Procedures.png',
isInPatient: isInpatient), isInPatient: isInpatient),
PatientProfileCardModel(TranslationBase.of(context).insurance!, TranslationBase.of(context).service!, PatientProfileCardModel(
PATIENT_INSURANCE_APPROVALS_NEW, 'patient/vital_signs.png', TranslationBase.of(context).insurance!,
TranslationBase.of(context).service!,
PATIENT_INSURANCE_APPROVALS_NEW,
'patient/vital_signs.png',
isInPatient: isInpatient), isInPatient: isInpatient),
PatientProfileCardModel(TranslationBase.of(context).patientSick!, TranslationBase.of(context).leave!, ADD_SICKLEAVE, 'patient/patient_sick_leave.png', PatientProfileCardModel(
TranslationBase.of(context).patientSick!,
TranslationBase.of(context).leave!,
ADD_SICKLEAVE,
'patient/patient_sick_leave.png',
isInPatient: isInpatient), isInPatient: isInpatient),
if (patient.appointmentNo != null && patient.appointmentNo != 0) if (patient.appointmentNo != null && patient.appointmentNo != 0)
PatientProfileCardModel(TranslationBase.of(context).patient!, TranslationBase.of(context).ucaf!, PatientProfileCardModel(
PATIENT_UCAF_REQUEST, 'patient/ucaf.png', TranslationBase.of(context).patient!,
isInPatient: isInpatient, isDisable: patient.patientStatusType != 43 ? true : false), TranslationBase.of(context).ucaf!,
PATIENT_UCAF_REQUEST,
'patient/ucaf.png',
isInPatient: isInpatient,
isDisable: patient.patientStatusType != 43 ? true : false),
if (patient.appointmentNo != null && patient.appointmentNo != 0) if (patient.appointmentNo != null && patient.appointmentNo != 0)
PatientProfileCardModel(TranslationBase.of(context).referral!, TranslationBase.of(context).patient!, PatientProfileCardModel(
REFER_PATIENT_TO_DOCTOR, 'patient/refer_patient.png', TranslationBase.of(context).referral!,
isInPatient: isInpatient, isDisable: patient.patientStatusType != 43 ? true : false), TranslationBase.of(context).patient!,
REFER_PATIENT_TO_DOCTOR,
'patient/refer_patient.png',
isInPatient: isInpatient,
isDisable: patient.patientStatusType != 43 ? true : false),
if (patient.appointmentNo != null && patient.appointmentNo != 0) if (patient.appointmentNo != null && patient.appointmentNo != 0)
PatientProfileCardModel(TranslationBase.of(context).admission!, TranslationBase.of(context).request!, PatientProfileCardModel(
PATIENT_ADMISSION_REQUEST, 'patient/admission_req.png', TranslationBase.of(context).admission!,
isInPatient: isInpatient, isDisable: patient.patientStatusType != 43 ? true : false), TranslationBase.of(context).request!,
PATIENT_ADMISSION_REQUEST,
'patient/admission_req.png',
isInPatient: isInpatient,
isDisable: patient.patientStatusType != 43 ? true : false),
]; ];
return Column( return Column(
@ -83,7 +125,8 @@ class ProfileGridForSearch extends StatelessWidget {
crossAxisCount: 3, crossAxisCount: 3,
itemCount: cardsList.length, itemCount: cardsList.length,
staggeredTileBuilder: (int index) => StaggeredTile.fit(1), staggeredTileBuilder: (int index) => StaggeredTile.fit(1),
itemBuilder: (BuildContext context, int index) => PatientProfileButton( itemBuilder: (BuildContext context, int index) =>
PatientProfileButton(
patient: patient, patient: patient,
patientType: patientType, patientType: patientType,
arrivalType: arrivalType, arrivalType: arrivalType,

@ -18,7 +18,8 @@ import 'package:flutter/material.dart';
class MyReferralDetailScreen extends StatelessWidget { class MyReferralDetailScreen extends StatelessWidget {
final MyReferralPatientModel? referralPatient; final MyReferralPatientModel? referralPatient;
const MyReferralDetailScreen({Key? key, this.referralPatient}) : super(key: key); const MyReferralDetailScreen({Key? key, this.referralPatient})
: super(key: key);
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
@ -53,7 +54,9 @@ class MyReferralDetailScreen extends StatelessWidget {
), ),
Expanded( Expanded(
child: AppText( child: AppText(
(Helpers.capitalize(referralPatient!.firstName! + " " + referralPatient!.lastName!)), (Helpers.capitalize(referralPatient!.firstName! +
" " +
referralPatient!.lastName!)),
fontSize: SizeConfig.textMultiplier * 2.5, fontSize: SizeConfig.textMultiplier * 2.5,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
fontFamily: 'Poppins', fontFamily: 'Poppins',
@ -93,23 +96,32 @@ class MyReferralDetailScreen extends StatelessWidget {
child: Column( child: Column(
children: [ children: [
Row( Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween, mainAxisAlignment:
MainAxisAlignment.spaceBetween,
children: [ children: [
AppText( AppText(
referralPatient!.referralStatus != null referralPatient!.referralStatus != null
? model.getReferralStatusNameByCode(referralPatient!.referralStatus!, context) ? model.getReferralStatusNameByCode(
referralPatient!.referralStatus!,
context)
: "", : "",
fontFamily: 'Poppins', fontFamily: 'Poppins',
fontSize: 1.9 * SizeConfig.textMultiplier, fontSize: 1.9 * SizeConfig.textMultiplier,
fontWeight: FontWeight.w700, fontWeight: FontWeight.w700,
color: referralPatient!.referralStatus == 1 color: referralPatient!.referralStatus ==
1
? Color(0xffc4aa54) ? Color(0xffc4aa54)
: referralPatient!.referralStatus == 46 || referralPatient!.referralStatus! == 2 : referralPatient!.referralStatus ==
46 ||
referralPatient!
.referralStatus! ==
2
? Colors.green[700] ? Colors.green[700]
: Colors.red[700], : Colors.red[700],
), ),
AppText( AppText(
AppDateUtils.getDayMonthYearDateFormatted(referralPatient!.referralDate!), AppDateUtils.getDayMonthYearDateFormatted(
referralPatient!.referralDate!),
fontFamily: 'Poppins', fontFamily: 'Poppins',
fontWeight: FontWeight.w600, fontWeight: FontWeight.w600,
fontSize: 2.0 * SizeConfig.textMultiplier, fontSize: 2.0 * SizeConfig.textMultiplier,
@ -118,29 +130,35 @@ class MyReferralDetailScreen extends StatelessWidget {
], ],
), ),
Row( Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween, mainAxisAlignment:
MainAxisAlignment.spaceBetween,
children: [ children: [
Row( Row(
mainAxisAlignment: MainAxisAlignment.start, mainAxisAlignment:
MainAxisAlignment.start,
children: [ children: [
AppText( AppText(
TranslationBase.of(context).fileNumber, TranslationBase.of(context)
.fileNumber,
fontFamily: 'Poppins', fontFamily: 'Poppins',
fontWeight: FontWeight.w600, fontWeight: FontWeight.w600,
fontSize: 1.7 * SizeConfig.textMultiplier, fontSize:
1.7 * SizeConfig.textMultiplier,
color: Color(0XFF575757), color: Color(0XFF575757),
), ),
AppText( AppText(
"${referralPatient!.patientID}", "${referralPatient!.patientID}",
fontFamily: 'Poppins', fontFamily: 'Poppins',
fontWeight: FontWeight.w700, fontWeight: FontWeight.w700,
fontSize: 1.8 * SizeConfig.textMultiplier, fontSize:
1.8 * SizeConfig.textMultiplier,
color: Color(0XFF2E303A), color: Color(0XFF2E303A),
), ),
], ],
), ),
AppText( AppText(
AppDateUtils.getTimeHHMMA(referralPatient!.referralDate!), AppDateUtils.getTimeHHMMA(
referralPatient!.referralDate!),
fontFamily: 'Poppins', fontFamily: 'Poppins',
fontWeight: FontWeight.w600, fontWeight: FontWeight.w600,
fontSize: 1.8 * SizeConfig.textMultiplier, fontSize: 1.8 * SizeConfig.textMultiplier,
@ -149,50 +167,70 @@ class MyReferralDetailScreen extends StatelessWidget {
], ],
), ),
Row( Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween, mainAxisAlignment:
MainAxisAlignment.spaceBetween,
crossAxisAlignment: CrossAxisAlignment.center, crossAxisAlignment: CrossAxisAlignment.center,
children: [ children: [
Expanded( Expanded(
child: Column( child: Column(
children: [ children: [
Row( Row(
mainAxisAlignment: MainAxisAlignment.start, mainAxisAlignment:
MainAxisAlignment.start,
children: [ children: [
AppText( AppText(
TranslationBase.of(context).referredFrom, TranslationBase.of(context)
.referredFrom,
fontFamily: 'Poppins', fontFamily: 'Poppins',
fontWeight: FontWeight.w600, fontWeight: FontWeight.w600,
fontSize: 1.7 * SizeConfig.textMultiplier, fontSize: 1.7 *
SizeConfig.textMultiplier,
color: Color(0XFF575757), color: Color(0XFF575757),
), ),
AppText( AppText(
referralPatient!.targetProjectId! == referralPatient!.sourceProjectId! referralPatient!
? TranslationBase.of(context).sameBranch .targetProjectId! ==
: TranslationBase.of(context).otherBranch, referralPatient!
.sourceProjectId!
? TranslationBase.of(
context)
.sameBranch
: TranslationBase.of(
context)
.otherBranch,
fontFamily: 'Poppins', fontFamily: 'Poppins',
fontWeight: FontWeight.w700, fontWeight: FontWeight.w700,
fontSize: 1.8 * SizeConfig.textMultiplier, fontSize: 1.8 *
SizeConfig.textMultiplier,
color: Color(0XFF2E303A), color: Color(0XFF2E303A),
), ),
], ],
), ),
Row( Row(
mainAxisAlignment: MainAxisAlignment.start, mainAxisAlignment:
crossAxisAlignment: CrossAxisAlignment.start, MainAxisAlignment.start,
crossAxisAlignment:
CrossAxisAlignment.start,
children: [ children: [
AppText( AppText(
TranslationBase.of(context).remarks! + " : ", TranslationBase.of(context)
.remarks! +
" : ",
fontFamily: 'Poppins', fontFamily: 'Poppins',
fontWeight: FontWeight.w600, fontWeight: FontWeight.w600,
fontSize: 1.7 * SizeConfig.textMultiplier, fontSize: 1.7 *
SizeConfig.textMultiplier,
color: Color(0XFF575757), color: Color(0XFF575757),
), ),
Expanded( Expanded(
child: AppText( child: AppText(
referralPatient!.referringDoctorRemarks ?? '', referralPatient!
.referringDoctorRemarks ??
'',
fontFamily: 'Poppins', fontFamily: 'Poppins',
fontWeight: FontWeight.w700, fontWeight: FontWeight.w700,
fontSize: 1.8 * SizeConfig.textMultiplier, fontSize: 1.8 *
SizeConfig.textMultiplier,
color: Color(0XFF2E303A), color: Color(0XFF2E303A),
), ),
), ),
@ -204,22 +242,29 @@ class MyReferralDetailScreen extends StatelessWidget {
Row( Row(
children: [ children: [
AppText( AppText(
referralPatient!.nationalityName != null referralPatient!.nationalityName !=
null
? referralPatient!.nationalityName ? referralPatient!.nationalityName
: "", : "",
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
color: Color(0xFF2E303A), color: Color(0xFF2E303A),
fontSize: 1.4 * SizeConfig.textMultiplier, fontSize:
1.4 * SizeConfig.textMultiplier,
), ),
referralPatient!.nationalityFlagURL != null referralPatient!.nationalityFlagURL !=
null
? ClipRRect( ? ClipRRect(
borderRadius: BorderRadius.circular(20.0), borderRadius:
BorderRadius.circular(20.0),
child: Image.network( child: Image.network(
referralPatient!.nationalityFlagURL!, referralPatient!
.nationalityFlagURL!,
height: 25, height: 25,
width: 30, width: 30,
errorBuilder: errorBuilder: (BuildContext?
(BuildContext ?context, Object ?exception, StackTrace? stackTrace) { context,
Object? exception,
StackTrace? stackTrace) {
return Text('No Image'); return Text('No Image');
}, },
)) ))
@ -232,7 +277,8 @@ class MyReferralDetailScreen extends StatelessWidget {
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
Container( Container(
margin: EdgeInsets.only(left: 10, right: 0), margin:
EdgeInsets.only(left: 10, right: 0),
child: Image.asset( child: Image.asset(
'assets/images/patient/ic_ref_arrow_up.png', 'assets/images/patient/ic_ref_arrow_up.png',
height: 50, height: 50,
@ -240,14 +286,20 @@ class MyReferralDetailScreen extends StatelessWidget {
), ),
), ),
Container( Container(
margin: EdgeInsets.only(left: 0, top: 25, right: 0, bottom: 0), margin: EdgeInsets.only(
padding: EdgeInsets.only(left: 4.0, right: 4.0), left: 0,
top: 25,
right: 0,
bottom: 0),
padding: EdgeInsets.only(
left: 4.0, right: 4.0),
child: Container( child: Container(
width: 40, width: 40,
height: 40, height: 40,
child: CircleAvatar( child: CircleAvatar(
radius: 25.0, radius: 25.0,
backgroundImage: NetworkImage(referralPatient!.doctorImageURL!), backgroundImage: NetworkImage(
referralPatient!.doctorImageURL!),
backgroundColor: Colors.transparent, backgroundColor: Colors.transparent,
), ),
), ),
@ -255,14 +307,19 @@ class MyReferralDetailScreen extends StatelessWidget {
Expanded( Expanded(
flex: 4, flex: 4,
child: Container( child: Container(
margin: EdgeInsets.only(left: 10, top: 25, right: 10, bottom: 0), margin: EdgeInsets.only(
left: 10,
top: 25,
right: 10,
bottom: 0),
child: Column( child: Column(
children: [ children: [
AppText( AppText(
referralPatient!.doctorName, referralPatient!.doctorName,
fontFamily: 'Poppins', fontFamily: 'Poppins',
fontWeight: FontWeight.w700, fontWeight: FontWeight.w700,
fontSize: 1.7 * SizeConfig.textMultiplier, fontSize: 1.7 *
SizeConfig.textMultiplier,
color: Color(0XFF2E303A), color: Color(0XFF2E303A),
), ),
], ],
@ -293,7 +350,8 @@ class MyReferralDetailScreen extends StatelessWidget {
padding: const EdgeInsets.symmetric(horizontal: 16), padding: const EdgeInsets.symmetric(horizontal: 16),
child: SizedBox( child: SizedBox(
child: ProfileMedicalInfoWidgetSearch( child: ProfileMedicalInfoWidgetSearch(
patient: model.getPatientFromReferralO(referralPatient!), patient: model
.getPatientFromReferralO(referralPatient!),
patientType: "7", patientType: "7",
isInpatient: false, isInpatient: false,
from: null, from: null,
@ -321,11 +379,14 @@ class MyReferralDetailScreen extends StatelessWidget {
vPadding: 12, vPadding: 12,
disabled: model.state == ViewState.Busy, disabled: model.state == ViewState.Busy,
onPressed: () async { onPressed: () async {
await model.responseReferral(referralPatient!, true); await model.responseReferral(
referralPatient!, true);
if (model.state == ViewState.ErrorLocal) { if (model.state == ViewState.ErrorLocal) {
DrAppToastMsg.showErrorToast(model.error); DrAppToastMsg.showErrorToast(model.error);
} else { } else {
DrAppToastMsg.showSuccesToast(TranslationBase.of(context).referralSuccessMsgAccept); DrAppToastMsg.showSuccesToast(
TranslationBase.of(context)
.referralSuccessMsgAccept);
model.getMyReferralOutPatientService(); model.getMyReferralOutPatientService();
Navigator.pop(context); Navigator.pop(context);
Navigator.pop(context); Navigator.pop(context);
@ -346,11 +407,14 @@ class MyReferralDetailScreen extends StatelessWidget {
vPadding: 12, vPadding: 12,
disabled: model.state == ViewState.Busy, disabled: model.state == ViewState.Busy,
onPressed: () async { onPressed: () async {
await model.responseReferral(referralPatient!, false); await model.responseReferral(
referralPatient!, false);
if (model.state == ViewState.ErrorLocal) { if (model.state == ViewState.ErrorLocal) {
DrAppToastMsg.showErrorToast(model.error); DrAppToastMsg.showErrorToast(model.error);
} else { } else {
DrAppToastMsg.showSuccesToast(TranslationBase.of(context).referralSuccessMsgReject); DrAppToastMsg.showSuccesToast(
TranslationBase.of(context)
.referralSuccessMsgReject);
model.getMyReferralOutPatientService(); model.getMyReferralOutPatientService();
Navigator.pop(context); Navigator.pop(context);
Navigator.pop(context); Navigator.pop(context);

File diff suppressed because it is too large Load Diff

@ -35,7 +35,7 @@ packages:
name: async name: async
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "2.8.1" version: "2.8.2"
autocomplete_textfield: autocomplete_textfield:
dependency: "direct main" dependency: "direct main"
description: description:
@ -154,7 +154,7 @@ packages:
name: characters name: characters
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "1.1.0" version: "1.2.0"
charcode: charcode:
dependency: transitive dependency: transitive
description: description:
@ -769,7 +769,7 @@ packages:
name: matcher name: matcher
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "0.12.10" version: "0.12.11"
meta: meta:
dependency: transitive dependency: transitive
description: description:
@ -1173,7 +1173,7 @@ packages:
name: test_api name: test_api
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "0.4.2" version: "0.4.3"
timing: timing:
dependency: transitive dependency: transitive
description: description:
@ -1257,7 +1257,7 @@ packages:
name: vector_math name: vector_math
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "2.1.0" version: "2.1.1"
video_player: video_player:
dependency: transitive dependency: transitive
description: description:

Loading…
Cancel
Save