From cc2c0f9a1e06f2d748d53089854ce9fc6d4ac272 Mon Sep 17 00:00:00 2001 From: Amjad Amireh Date: Sun, 7 Jun 2020 12:15:38 +0300 Subject: [PATCH] Modify Patiant screen List style --- lib/screens/patients/patients_screen.dart | 351 ++++++++++-------- .../shared/card_with_bgNew_widget.dart | 3 + 2 files changed, 191 insertions(+), 163 deletions(-) diff --git a/lib/screens/patients/patients_screen.dart b/lib/screens/patients/patients_screen.dart index e958244f..21da6178 100644 --- a/lib/screens/patients/patients_screen.dart +++ b/lib/screens/patients/patients_screen.dart @@ -317,7 +317,7 @@ class _PatientsScreenState extends State { child: Center( child: Padding( padding: const EdgeInsets.fromLTRB( - 0, 250, 0, 0), + 0, 0, 0, 0),//250 child: DrAppCircularProgressIndeicator(), )), @@ -367,182 +367,192 @@ class _PatientsScreenState extends State { // mainAxisAlignment: MainAxisAlignment.center, children: responseModelList .map((PatiantInformtion item) { - return InkWell( - child: CardWithBgWidgetNew( - //CardWithBgWidget( - - widget: Column( - children: [ - Row( - children: [ - Column( - mainAxisAlignment: - MainAxisAlignment - .start, - children: - item.genderDescription == - "Male" - ? [ - SvgPicture.asset( - url + - avatarMale, - height: - 80.0, - width: - 80.0, - semanticsLabel: - 'Male Logo') - ] - : [ - SvgPicture.asset( - url + - avatarFemale, - height: - 80.0, - width: - 80.0, - semanticsLabel: - 'Female Logo') - ], - - ), - SizedBox( - width: 10, - ), - Column( - crossAxisAlignment: - CrossAxisAlignment - .start, + return Container( + decoration: myBoxDecoration(), + child: InkWell( + child: CardWithBgWidgetNew( + //CardWithBgWidget( + + widget: Column( + children: [ + Container( + // decoration: myBoxDecoration(), + child: Row( children: [ - AppText( - item.firstName + - " " + - item.lastName, - fontSize: 2.0 * - SizeConfig - .textMultiplier, - fontWeight: - FontWeight - .bold, - backGroundcolor: - Colors.white, - ), - SizedBox( - height: 8, - ), - AppText( - "File Number:" + - item.patientId - .toString(), - fontSize: 2.0 * - SizeConfig - .textMultiplier, - fontWeight: - FontWeight - .bold, - backGroundcolor: - Colors.white, - ), + Column( + mainAxisAlignment: + MainAxisAlignment + .start, + children: + item.genderDescription == + "Male" + ? [ + SvgPicture.asset( + url + + avatarMale, + height: + 80.0, + width: + 80.0, + semanticsLabel: + 'Male Logo') + ] + : [ + SvgPicture.asset( + url + + avatarFemale, + height: + 80.0, + width: + 80.0, + semanticsLabel: + 'Female Logo') + ], - // SizedBox( - // height: 8, - // ), - AppText( - "Age:" + - item.age - .toString(), - fontSize: 2.0 * - SizeConfig - .textMultiplier, - fontWeight: - FontWeight - .bold, - backGroundcolor: - Colors.white, ), SizedBox( - height: 8, - ), - SERVICES_PATIANT2[int - .parse( - patientType)] == - "List_MyOutPatient" - ? Row( - mainAxisAlignment: - MainAxisAlignment - .spaceBetween, - children: < - Widget>[ - Container( - height: - 20, - width: - 80, - decoration: - BoxDecoration( - borderRadius: - BorderRadius.circular(50), - color: - Hexcolor("#20A169"), - ), - child: - AppText( - item.startTime, - color: - Colors.white, - fontSize: - 2 * SizeConfig.textMultiplier, - textAlign: - TextAlign.center, - fontWeight: - FontWeight.bold, - ), - ), - SizedBox( - width: - 60, - ), - Container( - child: - AppText( - convertDateFormat2(item - .appointmentDate - .toString()), - fontSize: - 2.0 * SizeConfig.textMultiplier, - fontWeight: - FontWeight.bold, - ), + width: 10, + ), + Column( + crossAxisAlignment: + CrossAxisAlignment + .start, + children: [ + AppText( + item.firstName + + " " + + item.lastName, + fontSize: 2.0 * + SizeConfig + .textMultiplier, + fontWeight: + FontWeight + .bold, + backGroundcolor: + Colors.white, + ), + SizedBox( + height: 8, + ), + AppText( + "File Number:" + + item.patientId + .toString(), + fontSize: 2.0 * + SizeConfig + .textMultiplier, + fontWeight: + FontWeight + .bold, + backGroundcolor: + Colors.white, + ), + + // SizedBox( + // height: 8, + // ), + AppText( + "Age:" + + item.age + .toString(), + fontSize: 2.0 * + SizeConfig + .textMultiplier, + fontWeight: + FontWeight + .bold, + backGroundcolor: + Colors.white, + ), + SizedBox( + height: 8, + ), + SERVICES_PATIANT2[int + .parse( + patientType)] == + "List_MyOutPatient" + ? Row( + mainAxisAlignment: + MainAxisAlignment + .spaceBetween, + children: < + Widget>[ + Container( + height: + 20, + width: + 80, + decoration: + BoxDecoration( + borderRadius: + BorderRadius.circular(50), + color: + Hexcolor("#20A169"), + ), + child: + AppText( + item.startTime, + color: + Colors.white, + fontSize: + 2 * SizeConfig.textMultiplier, + textAlign: + TextAlign.center, + fontWeight: + FontWeight.bold, + ), + ), + SizedBox( + width: + 60, + ), + Container( + child: + AppText( + convertDateFormat2(item + .appointmentDate + .toString()), + fontSize: + 2.0 * SizeConfig.textMultiplier, + fontWeight: + FontWeight.bold, + ), + ) + ], ) - ], - ) - : AppText( - item.nationalityName, - fontSize: 2.5 * - SizeConfig - .textMultiplier, - ), + : AppText( + item.nationalityName, + fontSize: 2.5 * + SizeConfig + .textMultiplier, + ), + ], + ), + // Divider(color: Colors.grey) ], ), - ], - ), - Divider(color: Colors.grey) - ], + ), + // Divider(color: Colors.grey) + ], + ), ), + onTap: () { + Navigator.of(context).pushNamed( + PATIENTS_PROFILE, + arguments: { + "patient": item + }); + }, ), - onTap: () { - Navigator.of(context).pushNamed( - PATIENTS_PROFILE, - arguments: { - "patient": item - }); - }, ); - }).toList(), + + }).toList(), ), ), ], + ), + ) ], ), @@ -633,4 +643,19 @@ class _PatientsScreenState extends State { ), ); } + + myBoxDecoration() { + + return BoxDecoration( + border: Border( + + + bottom: BorderSide( // <--- top side + color: Colors.grey, + width: 1.0, + ), + ), + ); + + } } diff --git a/lib/widgets/shared/card_with_bgNew_widget.dart b/lib/widgets/shared/card_with_bgNew_widget.dart index 25cb509c..51822cc2 100644 --- a/lib/widgets/shared/card_with_bgNew_widget.dart +++ b/lib/widgets/shared/card_with_bgNew_widget.dart @@ -36,6 +36,7 @@ class CardWithBgWidgetNew extends StatelessWidget { children: [ Center( child: Container( + // padding:EdgeInsets.fromLTRB(0, 10,0, 10), //EdgeInsets.all(10.0),//10 // margin: EdgeInsets.only(left: 10), child: Padding( @@ -48,4 +49,6 @@ class CardWithBgWidgetNew extends StatelessWidget { ), ); } + + }