Medical Profile Buttons Lock

merge-update-with-lab-changes
Mirza.Shafique 5 years ago
parent b31813770e
commit 2fda47baf6

@ -1089,6 +1089,7 @@ const Map localizedValues = {
}, },
"MoreDetails": {"en": "More details", "ar": " المزيد من التفاصيل "}, "MoreDetails": {"en": "More details", "ar": " المزيد من التفاصيل "},
"SendCopy": {"en": "Send Copy", "ar": "ارسال نسخة"}, "SendCopy": {"en": "Send Copy", "ar": "ارسال نسخة"},
"ResendOrder": {"en": "Resend order & deliver", "ar": "إعادة طلب و توصيل"}, "ResendOrder": {"en": "Resend order & deliver", "ar": "إعادة طلب و توصيل"},
"Ports": {"en": "Ports", "ar": "المنافذ"}, "Ports": {"en": "Ports", "ar": "المنافذ"},
"Way": {"en": "Way", "ar": "الطزيقة"}, "Way": {"en": "Way", "ar": "الطزيقة"},

@ -49,7 +49,8 @@ class ActiveMedicationsPage extends StatelessWidget {
height: 5, height: 5,
), ),
Texts( Texts(
TranslationBase.of(context).expDate+' :' + TranslationBase.of(context).expDate +
' :' +
DateUtil.getDayMonthYearDateFormatted(model DateUtil.getDayMonthYearDateFormatted(model
.activePrescriptionReport[index].orderDate), .activePrescriptionReport[index].orderDate),
), ),
@ -57,21 +58,24 @@ class ActiveMedicationsPage extends StatelessWidget {
height: 5, height: 5,
), ),
Texts( Texts(
TranslationBase.of(context).route+ ' :' + TranslationBase.of(context).route +
' :' +
model.activePrescriptionReport[index].route, model.activePrescriptionReport[index].route,
), ),
SizedBox( SizedBox(
height: 5, height: 5,
), ),
Texts( Texts(
TranslationBase.of(context).frequency+ ' :' + TranslationBase.of(context).frequency +
' :' +
model.activePrescriptionReport[index].frequency, model.activePrescriptionReport[index].frequency,
), ),
SizedBox( SizedBox(
height: 5, height: 5,
), ),
Texts( Texts(
TranslationBase.of(context).dailyQuantity + ' :${model.activePrescriptionReport[index].doseDailyQuantity}', TranslationBase.of(context).dailyQuantity +
' :${model.activePrescriptionReport[index].doseDailyQuantity}',
), ),
], ],
), ),
@ -86,16 +90,20 @@ class ActiveMedicationsPage extends StatelessWidget {
color: Colors.red, color: Colors.red,
size: 28, size: 28,
), ),
SizedBox(height: 25,), SizedBox(
height: 25,
),
InkWell( InkWell(
onTap: (){ onTap: () {
Navigator.push( Navigator.push(
context, context,
FadePage( FadePage(
page: ReminderPage( page: ReminderPage(
frequency: model.activePrescriptionReport[index] frequency: model
.activePrescriptionReport[index]
.frequencyNumber, .frequencyNumber,
days: model.activePrescriptionReport[index].days, days: model
.activePrescriptionReport[index].days,
itemDescription: model itemDescription: model
.activePrescriptionReport[index] .activePrescriptionReport[index]
.itemDescription, .itemDescription,

@ -209,49 +209,44 @@ class Utils {
bool isLogin, bool isLogin,
count}) { count}) {
List<Widget> medical = List(); List<Widget> medical = List();
if (projectViewModel.havePrivilege(5)) {
medical.add(InkWell( medical.add(InkWell(
onTap: () { onTap: () => projectViewModel.havePrivilege(5)
Navigator.push( ? Navigator.push(context, FadePage(page: MyAppointments()))
context, : null,
FadePage( child: isLogin
page: MyAppointments(), ? Stack(children: [
), MedicalProfileItem(
);
},
child: isLogin
? Stack(children: [
MedicalProfileItem(
title: TranslationBase.of(context).myAppointments, title: TranslationBase.of(context).myAppointments,
imagePath: 'my_appointment_icon.png', imagePath: 'my_appointment_icon.png',
subTitle: TranslationBase.of(context).myAppointmentsList, subTitle: TranslationBase.of(context).myAppointmentsList,
hasBadge: true, hasBadge: true,
), isEnable: projectViewModel.havePrivilege(5)),
Positioned( Positioned(
right: 0.0, right: 0.0,
child: Badge( child: Badge(
toAnimate: false, toAnimate: false,
position: BadgePosition.topEnd(), position: BadgePosition.topEnd(),
shape: BadgeShape.circle, shape: BadgeShape.circle,
badgeColor: secondaryColor.withOpacity(1.0), badgeColor: secondaryColor.withOpacity(1.0),
borderRadius: BorderRadius.circular(8), borderRadius: BorderRadius.circular(8),
badgeContent: Container( badgeContent: Container(
padding: EdgeInsets.all(2.0), padding: EdgeInsets.all(2.0),
child: Text(count.toString(), child: Text(count.toString(),
style: style: TextStyle(color: Colors.white, fontSize: 16.0)),
TextStyle(color: Colors.white, fontSize: 16.0)),
),
), ),
), ),
])
: MedicalProfileItem(
title: TranslationBase.of(context).myAppointments,
imagePath: 'my_appointment_icon.png',
subTitle: TranslationBase.of(context).myAppointmentsList,
hasBadge: true,
), ),
)); ])
} : MedicalProfileItem(
title: TranslationBase.of(context).myAppointments,
imagePath: 'my_appointment_icon.png',
subTitle: TranslationBase.of(context).myAppointmentsList,
hasBadge: true,
isEnable: projectViewModel.havePrivilege(5),
),
));
if (projectViewModel.havePrivilege(10)) { if (projectViewModel.havePrivilege(10)) {
medical.add(InkWell( medical.add(InkWell(
onTap: () => Navigator.push(context, FadePage(page: LabsHomePage())), onTap: () => Navigator.push(context, FadePage(page: LabsHomePage())),
@ -263,106 +258,97 @@ class Utils {
)); ));
} }
if (projectViewModel.havePrivilege(7)) { medical.add(InkWell(
medical.add(InkWell( onTap: () => projectViewModel.havePrivilege(7)
onTap: () => ? Navigator.push(context, FadePage(page: RadiologyHomePage()))
Navigator.push(context, FadePage(page: RadiologyHomePage())), : null,
child: MedicalProfileItem( child: MedicalProfileItem(
title: TranslationBase.of(context).radiology, title: TranslationBase.of(context).radiology,
imagePath: 'radiology_icon.png', imagePath: 'radiology_icon.png',
subTitle: TranslationBase.of(context).radiologySubtitle, subTitle: TranslationBase.of(context).radiologySubtitle,
), isEnable: projectViewModel.havePrivilege(7),
)); ),
} ));
if (projectViewModel.havePrivilege(12)) { medical.add(InkWell(
medical.add(InkWell( onTap: () => projectViewModel.havePrivilege(12)
onTap: () { ? Navigator.push(context, FadePage(page: HomePrescriptionsPage()))
Navigator.push( : null,
context, child: MedicalProfileItem(
FadePage( title: TranslationBase.of(context).medicines,
page: HomePrescriptionsPage(), imagePath: 'prescription_icon.png',
), subTitle: TranslationBase.of(context).medicinesSubtitle,
); isEnable: projectViewModel.havePrivilege(12),
}, ),
child: MedicalProfileItem( ));
title: TranslationBase.of(context).medicines,
imagePath: 'prescription_icon.png',
subTitle: TranslationBase.of(context).medicinesSubtitle,
),
));
}
if (projectViewModel.havePrivilege(25)) { medical.add(InkWell(
medical.add(InkWell( onTap: () => projectViewModel.havePrivilege(25)
onTap: () => Navigator.push( ? Navigator.push(
context, context,
FadePage( FadePage(page: VitalSignDetailsScreen()),
page: VitalSignDetailsScreen(), )
), : null,
), child: MedicalProfileItem(
child: MedicalProfileItem( title: TranslationBase.of(context).vitalSigns,
title: TranslationBase.of(context).vitalSigns, imagePath: 'vital_signs.png',
imagePath: 'vital_signs.png', subTitle: TranslationBase.of(context).vitalSignsSubtitle,
subTitle: TranslationBase.of(context).vitalSignsSubtitle, isEnable: projectViewModel.havePrivilege(25),
), ),
)); ));
}
if (projectViewModel.havePrivilege(48)) { medical.add(InkWell(
medical.add(InkWell( onTap: () => projectViewModel.havePrivilege(48)
onTap: () => ? Navigator.push(context, FadePage(page: ActiveMedicationsPage()))
Navigator.push(context, FadePage(page: ActiveMedicationsPage())), : null,
child: MedicalProfileItem( child: MedicalProfileItem(
title: TranslationBase.of(context).myMedical, title: TranslationBase.of(context).myMedical,
imagePath: 'active_medications.png', imagePath: 'active_medications.png',
subTitle: TranslationBase.of(context).myMedicalSubtitle, subTitle: TranslationBase.of(context).myMedicalSubtitle,
), isEnable: false,
)); ),
} ));
if (projectViewModel.havePrivilege(6)) { medical.add(InkWell(
medical.add(InkWell( onTap: () => projectViewModel.havePrivilege(6)
onTap: () { ? Navigator.push(
Navigator.push( context,
context, FadePage(
FadePage( page: DoctorHomePage(),
page: DoctorHomePage(), ),
), )
); : null,
}, child: MedicalProfileItem(
child: MedicalProfileItem(
title: TranslationBase.of(context).myDoctor, title: TranslationBase.of(context).myDoctor,
imagePath: 'doctor_icon.png', imagePath: 'doctor_icon.png',
subTitle: TranslationBase.of(context).myDoctorSubtitle, subTitle: TranslationBase.of(context).myDoctorSubtitle,
), isEnable: projectViewModel.havePrivilege(6)),
)); ));
}
medical.add(InkWell(
onTap: () => projectViewModel.havePrivilege(14)
? Navigator.push(context, FadePage(page: EyeMeasurementsPage()))
: null,
child: MedicalProfileItem(
title: TranslationBase.of(context).eye,
imagePath: 'eye_measurement_icon.png',
subTitle: TranslationBase.of(context).eyeSubtitle,
isEnable: projectViewModel.havePrivilege(14),
),
));
medical.add(InkWell(
onTap: () => projectViewModel.havePrivilege(22)
? Navigator.push(context, FadePage(page: InsuranceCard()))
: null,
child: MedicalProfileItem(
title: TranslationBase.of(context).insurance,
imagePath: 'insurance_card_icon.png',
subTitle: TranslationBase.of(context).insuranceSubtitle,
isEnable: projectViewModel.havePrivilege(22),
),
));
if (projectViewModel.havePrivilege(14)) {
medical.add(InkWell(
onTap: () {
Navigator.push(context, FadePage(page: EyeMeasurementsPage()));
},
child: MedicalProfileItem(
title: TranslationBase.of(context).eye,
imagePath: 'eye_measurement_icon.png',
subTitle: TranslationBase.of(context).eyeSubtitle,
),
));
}
if (projectViewModel.havePrivilege(22)) {
medical.add(InkWell(
onTap: () {
Navigator.push(context, FadePage(page: InsuranceCard()));
},
child: MedicalProfileItem(
title: TranslationBase.of(context).insurance,
imagePath: 'insurance_card_icon.png',
subTitle: TranslationBase.of(context).insuranceSubtitle,
),
));
}
medical.add(InkWell( medical.add(InkWell(
onTap: () { onTap: () {
Navigator.push(context, FadePage(page: InsuranceUpdate())); Navigator.push(context, FadePage(page: InsuranceUpdate()));
@ -374,137 +360,132 @@ class Utils {
), ),
)); ));
if (projectViewModel.havePrivilege(18)) { medical.add(InkWell(
medical.add(InkWell( onTap: () => projectViewModel.havePrivilege(18)
onTap: () { ? Navigator.push(context, FadePage(page: InsuranceApproval()))
Navigator.push(context, FadePage(page: InsuranceApproval())); : null,
}, child: MedicalProfileItem(
child: MedicalProfileItem( title: TranslationBase.of(context).insuranceApproval,
title: TranslationBase.of(context).insuranceApproval, imagePath: 'insurance_approvals_icon.png',
imagePath: 'insurance_approvals_icon.png', subTitle: TranslationBase.of(context).insuranceApprovalSubtitle,
subTitle: TranslationBase.of(context).insuranceApprovalSubtitle, isEnable: projectViewModel.havePrivilege(18),
), ),
)); ));
}
if (projectViewModel.havePrivilege(23)) { medical.add(InkWell(
medical.add(InkWell( onTap: () => projectViewModel.havePrivilege(23)
onTap: () => Navigator.push(context, FadePage(page: AllergiesPage())), ? Navigator.push(context, FadePage(page: AllergiesPage()))
child: MedicalProfileItem( : null,
title: TranslationBase.of(context).allergies, child: MedicalProfileItem(
imagePath: 'my_allergies_icon.png', title: TranslationBase.of(context).allergies,
subTitle: TranslationBase.of(context).allergiesSubtitle, imagePath: 'my_allergies_icon.png',
), subTitle: TranslationBase.of(context).allergiesSubtitle,
)); isEnable: projectViewModel.havePrivilege(23),
} ),
));
if (projectViewModel.havePrivilege(26)) { medical.add(InkWell(
medical.add(InkWell( onTap: () => projectViewModel.havePrivilege(26)
onTap: () { ? Navigator.push(context, FadePage(page: MyVaccines()))
Navigator.push(context, FadePage(page: MyVaccines())); : null,
}, child: MedicalProfileItem(
child: MedicalProfileItem( title: TranslationBase.of(context).myVaccines,
title: TranslationBase.of(context).myVaccines, imagePath: 'my_vaccines_icon.png',
imagePath: 'my_vaccines_icon.png', subTitle: TranslationBase.of(context).myVaccinesSubtitle,
subTitle: TranslationBase.of(context).myVaccinesSubtitle, isEnable: projectViewModel.havePrivilege(26),
), ),
)); ));
}
if (projectViewModel.havePrivilege(20))
medical.add(InkWell(
onTap: () {
Navigator.push(context, FadePage(page: HomeReportPage()));
},
child: MedicalProfileItem(
title: TranslationBase.of(context).medical,
imagePath: 'medical_reports_icon.png',
subTitle: TranslationBase.of(context).medicalSubtitle,
),
));
if (projectViewModel.havePrivilege(19)) { medical.add(InkWell(
medical.add(InkWell( onTap: () => projectViewModel.havePrivilege(20)
onTap: () { ? Navigator.push(context, FadePage(page: HomeReportPage()))
Navigator.push(context, FadePage(page: MonthlyReportsPage())); : null,
}, child: MedicalProfileItem(
child: MedicalProfileItem( title: TranslationBase.of(context).medical,
title: TranslationBase.of(context).monthly, imagePath: 'medical_reports_icon.png',
imagePath: 'monthly_reports_icon.png', subTitle: TranslationBase.of(context).medicalSubtitle,
subTitle: TranslationBase.of(context).monthlySubtitle, isEnable: projectViewModel.havePrivilege(20),
), ),
)); ));
}
if (projectViewModel.havePrivilege(16)) { medical.add(InkWell(
medical.add(InkWell( onTap: () => projectViewModel.havePrivilege(19)
onTap: () { ? Navigator.push(context, FadePage(page: MonthlyReportsPage()))
Navigator.push(context, FadePage(page: PatientSickLeavePage())); : null,
}, child: MedicalProfileItem(
child: MedicalProfileItem( title: TranslationBase.of(context).monthly,
title: TranslationBase.of(context).sick, imagePath: 'monthly_reports_icon.png',
imagePath: 'sick_leaves_icons.png', subTitle: TranslationBase.of(context).monthlySubtitle,
subTitle: TranslationBase.of(context).sickSubtitle, isEnable: projectViewModel.havePrivilege(19),
), ),
)); ));
}
if (projectViewModel.havePrivilege(47)) { medical.add(InkWell(
medical.add(InkWell( onTap: () => projectViewModel.havePrivilege(16)
onTap: () { ? Navigator.push(context, FadePage(page: PatientSickLeavePage()))
Navigator.push(context, FadePage(page: MyBalancePage())); : null,
}, child: MedicalProfileItem(
child: MedicalProfileItem( title: TranslationBase.of(context).sick,
title: TranslationBase.of(context).myBalance, imagePath: 'sick_leaves_icons.png',
imagePath: 'check-in.png', subTitle: TranslationBase.of(context).sickSubtitle,
subTitle: TranslationBase.of(context).myBalanceSubtitle, isEnable: projectViewModel.havePrivilege(16),
), ),
)); ));
}
if (projectViewModel.havePrivilege(61)) { medical.add(InkWell(
medical.add(MedicalProfileItem( onTap: () => projectViewModel.havePrivilege(47)
title: TranslationBase.of(context).patientCall, ? Navigator.push(context, FadePage(page: MyBalancePage()))
imagePath: 'medical_history_icon.png', : null,
subTitle: TranslationBase.of(context).patientCallSubtitle, child: MedicalProfileItem(
)); title: TranslationBase.of(context).myBalance,
} imagePath: 'check-in.png',
subTitle: TranslationBase.of(context).myBalanceSubtitle,
isEnable: projectViewModel.havePrivilege(47),
),
));
if (projectViewModel.havePrivilege(24)) { medical.add(MedicalProfileItem(
medical.add(InkWell( title: TranslationBase.of(context).patientCall,
onTap: () { imagePath: 'medical_history_icon.png',
Navigator.push(context, FadePage(page: MyTrackers())); subTitle: TranslationBase.of(context).patientCallSubtitle,
}, isEnable: projectViewModel.havePrivilege(61),
child: MedicalProfileItem( ));
title: TranslationBase.of(context).myTrackers,
imagePath: 'my_tracker_icon.png',
subTitle: TranslationBase.of(context).myTrackersSubtitle,
),
));
}
if (projectViewModel.havePrivilege(30))
medical.add(InkWell(
onTap: () {
Navigator.push(context, FadePage(page: SmartWatchInstructions()));
},
child: MedicalProfileItem(
title: TranslationBase.of(context).smartWatches,
imagePath: 'smartwatch_icon.png',
subTitle: TranslationBase.of(context).smartWatchesSubtitle,
),
));
if (projectViewModel.havePrivilege(28)) { medical.add(InkWell(
medical.add(InkWell( onTap: () => projectViewModel.havePrivilege(24)
onTap: () { ? Navigator.push(context, FadePage(page: MyTrackers()))
Navigator.push(context, FadePage(page: AskDoctorHomPage())); : null,
}, child: MedicalProfileItem(
child: MedicalProfileItem( title: TranslationBase.of(context).myTrackers,
imagePath: 'my_tracker_icon.png',
subTitle: TranslationBase.of(context).myTrackersSubtitle,
isEnable: projectViewModel.havePrivilege(24),
),
));
medical.add(InkWell(
onTap: () => projectViewModel.havePrivilege(30)
? Navigator.push(context, FadePage(page: SmartWatchInstructions()))
: null,
child: MedicalProfileItem(
title: TranslationBase.of(context).smartWatches,
imagePath: 'smartwatch_icon.png',
subTitle: TranslationBase.of(context).smartWatchesSubtitle,
isEnable: projectViewModel.havePrivilege(30),
),
));
medical.add(InkWell(
onTap: () => projectViewModel.havePrivilege(28)
? Navigator.push(context, FadePage(page: AskDoctorHomPage()))
: null,
child: MedicalProfileItem(
title: TranslationBase.of(context).askYour, title: TranslationBase.of(context).askYour,
imagePath: 'ask_doctor_icon.png', imagePath: 'ask_doctor_icon.png',
subTitle: TranslationBase.of(context).askYourSubtitle, subTitle: TranslationBase.of(context).askYourSubtitle,
), isEnable: projectViewModel.havePrivilege(28)),
)); ));
}
if (projectViewModel.havePrivilege(32) || true) { if (projectViewModel.havePrivilege(32) || true) {
medical.add(InkWell( medical.add(InkWell(
onTap: () { onTap: () {
@ -536,43 +517,46 @@ class Utils {
)); ));
} }
if (projectViewModel.havePrivilege(40)) { medical.add(InkWell(
medical.add(InkWell( onTap: () => projectViewModel.havePrivilege(40)
onTap: () { ? launch('whatsapp://send?phone=18885521858&text=')
launch('whatsapp://send?phone=18885521858&text='); : null,
}, child: MedicalProfileItem(
child: MedicalProfileItem( title: TranslationBase.of(context).chatbot,
title: TranslationBase.of(context).chatbot, imagePath: 'insurance_approvals_icon.png',
imagePath: 'insurance_approvals_icon.png', subTitle: TranslationBase.of(context).chatbotSubtitle,
subTitle: TranslationBase.of(context).chatbotSubtitle, isEnable: projectViewModel.havePrivilege(40),
), ),
)); ));
}
return medical; return medical;
} }
static Widget loadNetworkImage({@required String url, BoxFit fitting = BoxFit.cover}){ static Widget loadNetworkImage(
{@required String url, BoxFit fitting = BoxFit.cover}) {
return CachedNetworkImage( return CachedNetworkImage(
placeholderFadeInDuration: Duration(milliseconds: 250), placeholderFadeInDuration: Duration(milliseconds: 250),
fit: fitting, fit: fitting,
imageUrl: url, imageUrl: url,
placeholder: (context, url) => Container( placeholder: (context, url) =>
child: Center( Container(child: Center(child: CircularProgressIndicator())),
child: CircularProgressIndicator() errorWidget: (context, url, error) {
) return Icon(
), Icons.error,
errorWidget: (context, url, error){ color: Colors.red,
return Icon(Icons.error, color: Colors.red, size: 50,); size: 50,
} );
); });
} }
} }
Widget applyShadow(
{Color color = Colors.grey,
double shadowOpacity = 0.5,
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}){ double spreadRadius = 2,
double blurRadius = 7,
Offset offset = const Offset(2, 2),
@required Widget child}) {
return Container( return Container(
decoration: BoxDecoration( decoration: BoxDecoration(
boxShadow: [ boxShadow: [
@ -588,7 +572,6 @@ Widget applyShadow({ Color color = Colors.grey, double shadowOpacity = 0.5, doub
); );
} }
Future<AuthenticatedUser> userData() async { Future<AuthenticatedUser> userData() async {
var userData = AuthenticatedUser.fromJson( var userData = AuthenticatedUser.fromJson(
await AppSharedPreferences().getObject(MAIN_USER)); await AppSharedPreferences().getObject(MAIN_USER));
@ -603,15 +586,15 @@ extension IndexedIterable<E> on Iterable<E> {
} }
} }
openAppStore({String androidPackageName, String iOSAppID}) async{ openAppStore({String androidPackageName, String iOSAppID}) async {
if(Platform.isAndroid){ if (Platform.isAndroid) {
assert(!(androidPackageName == null), "Should have valid value in androidPackageName parameter"); assert(!(androidPackageName == null),
if((await FlutterHmsGmsAvailability.isGmsAvailable)) "Should have valid value in androidPackageName parameter");
if ((await FlutterHmsGmsAvailability.isGmsAvailable))
launch("market://details?id=com.ejada.hmg"); launch("market://details?id=com.ejada.hmg");
if((await FlutterHmsGmsAvailability.isHmsAvailable)) if ((await FlutterHmsGmsAvailability.isHmsAvailable))
launch("appmarket://details?id=com.ejada.hmg"); launch("appmarket://details?id=com.ejada.hmg");
} else if (Platform.isIOS) {
}else if(Platform.isIOS){
assert((iOSAppID == null), "Should have valid value in iOSAppID parameter"); assert((iOSAppID == null), "Should have valid value in iOSAppID parameter");
launch("https://itunes.apple.com/kr/app/apple-store/$iOSAppID)"); launch("https://itunes.apple.com/kr/app/apple-store/$iOSAppID)");
} }

@ -103,7 +103,7 @@ class _LaboratoryResultWidgetState extends State<LaboratoryResultWidget> {
color: Colors.white, color: Colors.white,
), ),
Texts( Texts(
TranslationBase.of(context).sendCopy, TranslationBase.of(context).sendEmail,
color: Colors.white, color: Colors.white,
) )
], ],

@ -8,16 +8,19 @@ import '../../../Constants.dart';
import '../text.dart'; import '../text.dart';
class MedicalProfileItem extends StatelessWidget { class MedicalProfileItem extends StatelessWidget {
MedicalProfileItem(
{@required this.imagePath,
@required this.title,
@required this.subTitle,
hasBadge});
final String imagePath; final String imagePath;
final String title; final String title;
final String subTitle; final String subTitle;
final bool hasBadge = false; final bool hasBadge = false;
bool isEnable;
MedicalProfileItem({
@required this.imagePath,
@required this.title,
@required this.subTitle,
hasBadge,
this.isEnable = true,
});
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
@ -26,27 +29,48 @@ class MedicalProfileItem extends StatelessWidget {
height: MediaQuery.of(context).size.height * 0.14, height: MediaQuery.of(context).size.height * 0.14,
margin: EdgeInsets.all(5), margin: EdgeInsets.all(5),
decoration: BoxDecoration( decoration: BoxDecoration(
borderRadius: BorderRadius.circular(10), borderRadius: BorderRadius.circular(10), color: Colors.white),
color: Colors.white clipBehavior: Clip.antiAlias,
), child: Stack(
padding: EdgeInsets.all(10), children: [
child: Column( Padding(
mainAxisAlignment: MainAxisAlignment.spaceBetween, padding: EdgeInsets.all(10),
crossAxisAlignment: CrossAxisAlignment.start, child: Column(
children: <Widget>[ mainAxisAlignment: MainAxisAlignment.spaceBetween,
Texts(title, crossAxisAlignment: CrossAxisAlignment.start,
fontSize: 1.5 * SizeConfig.textMultiplier, children: <Widget>[
color: secondaryColor, Texts(title,
fontWeight: FontWeight.bold), fontSize: 1.5 * SizeConfig.textMultiplier,
Texts(subTitle,fontSize: 1.4 * SizeConfig.textMultiplier,), color: secondaryColor,
Align( fontWeight: FontWeight.bold),
alignment:projectViewModel.isArabic ? Alignment.bottomLeft : Alignment.bottomRight, Texts(
child: Image.asset( subTitle,
"assets/images/medical/$imagePath", fontSize: 1.4 * SizeConfig.textMultiplier,
height: SizeConfig.heightMultiplier * 5, ),
width: SizeConfig.heightMultiplier * 5, Align(
alignment: projectViewModel.isArabic
? Alignment.bottomLeft
: Alignment.bottomRight,
child: Image.asset(
"assets/images/medical/$imagePath",
height: SizeConfig.heightMultiplier * 5,
width: SizeConfig.heightMultiplier * 5,
),
)
],
), ),
) ),
isEnable
? Container()
: Container(
width: double.infinity,
height: double.infinity,
color: Colors.grey.withOpacity(0.7),
child: Icon(
Icons.lock_outline,
size: 40,
),
)
], ],
), ),
); );

Loading…
Cancel
Save