From 52bd1511e83205a5048c15acfe1fcbee70a6afb4 Mon Sep 17 00:00:00 2001 From: Elham Rababh Date: Mon, 6 Dec 2021 17:33:21 +0200 Subject: [PATCH] fix patient card --- .../patients/In_patient/in_patient_list_page.dart | 1 + lib/util/helpers.dart | 15 +++++++++++++++ .../patients/patient_card/PatientCard.dart | 14 +------------- lib/widgets/shared/card_with_bg_widget.dart | 4 ++-- 4 files changed, 19 insertions(+), 15 deletions(-) diff --git a/lib/screens/patients/In_patient/in_patient_list_page.dart b/lib/screens/patients/In_patient/in_patient_list_page.dart index 6e9ad14f..7498257d 100644 --- a/lib/screens/patients/In_patient/in_patient_list_page.dart +++ b/lib/screens/patients/In_patient/in_patient_list_page.dart @@ -53,6 +53,7 @@ class _InPatientListPageState extends State { return AppScaffold( baseViewModel: widget.patientSearchViewModel, isShowAppBar: false, + backgroundColor: Color(0xFFF8F8F8), body: Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ diff --git a/lib/util/helpers.dart b/lib/util/helpers.dart index 368a4c94..17e75ba9 100644 --- a/lib/util/helpers.dart +++ b/lib/util/helpers.dart @@ -188,6 +188,21 @@ class Helpers { static clearSharedPref() async { await sharedPref.clear(); } + static getCardBoxDecoration(){ + return BoxDecoration( + borderRadius: BorderRadius.circular(10), + color: Colors.white, + shape: BoxShape.rectangle, + boxShadow: [ + BoxShadow( + color: Color(0xFF0000000D), + spreadRadius: 10, + blurRadius: 27, + offset: Offset(0, -3), // changes position of shadow + ), + ], + ); + } navigateToUpdatePage(String message, String androidLink, iosLink) { locator().pushAndRemoveUntil( diff --git a/lib/widgets/patients/patient_card/PatientCard.dart b/lib/widgets/patients/patient_card/PatientCard.dart index 5354bb5e..f8af64c2 100644 --- a/lib/widgets/patients/patient_card/PatientCard.dart +++ b/lib/widgets/patients/patient_card/PatientCard.dart @@ -56,19 +56,7 @@ class PatientCard extends StatelessWidget { width: SizeConfig.screenWidth * 0.9, margin: EdgeInsets.all(6), padding: EdgeInsets.only(left: projectViewModel.isArabic?5:0, right: projectViewModel.isArabic?0:5, bottom: 0, top: 0), - decoration: BoxDecoration( - borderRadius: BorderRadius.circular(10), - color: Colors.white, - shape: BoxShape.rectangle, - boxShadow: [ - BoxShadow( - color: Color(0x0000000D), - spreadRadius: 10, - blurRadius: 2.7, - offset: Offset(0, -3 ), // changes position of shadow - ), - ], - ), + decoration:Helpers.getCardBoxDecoration(), child: CardWithBgWidget( padding: 0, marginLeft: (!isMyPatient && isInpatient) ? 0 : 10, diff --git a/lib/widgets/shared/card_with_bg_widget.dart b/lib/widgets/shared/card_with_bg_widget.dart index e36b84a4..8dd7ba65 100644 --- a/lib/widgets/shared/card_with_bg_widget.dart +++ b/lib/widgets/shared/card_with_bg_widget.dart @@ -47,7 +47,7 @@ class CardWithBgWidget extends StatelessWidget { bottomRight: Radius.circular(10), ), ), - width: 10, + width: 6, ), bottom: 1, top: 1, @@ -63,7 +63,7 @@ class CardWithBgWidget extends StatelessWidget { bottomLeft: Radius.circular(10), ), ), - width: 7, + width: 5, ), bottom: 1, top: 1,