From 05525fd87ca379d599923e990ce7138b5fd7b205 Mon Sep 17 00:00:00 2001 From: Mohammad ALjammal Date: Thu, 4 Jun 2020 21:09:22 +0300 Subject: [PATCH] fix issues in My Referred Patient widget --- .../doctor/my_referred_patient_widget.dart | 240 +++++++++--------- 1 file changed, 114 insertions(+), 126 deletions(-) diff --git a/lib/widgets/doctor/my_referred_patient_widget.dart b/lib/widgets/doctor/my_referred_patient_widget.dart index 1af712ff..0ff1e433 100644 --- a/lib/widgets/doctor/my_referred_patient_widget.dart +++ b/lib/widgets/doctor/my_referred_patient_widget.dart @@ -87,144 +87,81 @@ class _MyReferredPatientWidgetState extends State { ), children: [ TableRow(children: [ - Expanded( - child: Container( - margin: EdgeInsets.all(2.5), - padding: EdgeInsets.all(5), - decoration: BoxDecoration(), - child: Column( - crossAxisAlignment: - CrossAxisAlignment.start, - children: [ - AppText( - TranslationBase.of(context).fileNo, - fontSize: - 1.7 * SizeConfig.textMultiplier, - fontWeight: FontWeight.bold, - ), - AppText( - '${widget.myReferredPatientModel.patientId}', - fontSize: - 1.7 * SizeConfig.textMultiplier, - fontWeight: FontWeight.w300, - ) - ], - ), + Container( + margin: EdgeInsets.all(2.5), + padding: EdgeInsets.all(5), + decoration: BoxDecoration(), + child: Column( + crossAxisAlignment: + CrossAxisAlignment.start, + children: [ + AppText( + TranslationBase.of(context).fileNo, + fontSize: + 1.7 * SizeConfig.textMultiplier, + fontWeight: FontWeight.bold, + ), + AppText( + '${widget.myReferredPatientModel.patientId}', + fontSize: + 1.7 * SizeConfig.textMultiplier, + fontWeight: FontWeight.w300, + ) + ], ), ), - Expanded( - child: Container( - margin: EdgeInsets.only( - left: 4, - top: 2.5, - right: 2.5, - bottom: 2.5), - padding: EdgeInsets.all(5), - child: Column( - crossAxisAlignment: - CrossAxisAlignment.start, - children: [ - AppText( - TranslationBase.of(context).referralDoctor, - fontSize: - 1.7 * SizeConfig.textMultiplier, - fontWeight: FontWeight.bold, - ), - Texts( - widget.myReferredPatientModel - .referralDoctorName, - maxLength: 80, - readMore: true, - ), - ], - ), + Container( + margin: EdgeInsets.only( + left: 4, + top: 2.5, + right: 2.5, + bottom: 2.5), + padding: EdgeInsets.all(5), + child: Column( + crossAxisAlignment: + CrossAxisAlignment.start, + children: [ + AppText( + TranslationBase.of(context).referralDoctor, + fontSize: + 1.7 * SizeConfig.textMultiplier, + fontWeight: FontWeight.bold, + ), + Texts( + widget.myReferredPatientModel + .referralDoctorName, + maxLength: 80, + readMore: true, + ), + ], ), ), ]), TableRow( children: [ - Expanded( - child: Container( - margin: EdgeInsets.all(2.5), - padding: EdgeInsets.all(5), - child: Column( - crossAxisAlignment: - CrossAxisAlignment.start, - children: [ - AppText( - TranslationBase.of(context).referringClinic, - fontSize: 1.7 * - SizeConfig.textMultiplier, - fontWeight: FontWeight.bold, - ), - AppText( - '${widget.myReferredPatientModel.referralClinicDescription}', - fontSize: 1.7 * - SizeConfig.textMultiplier, - fontWeight: FontWeight.w300, - ) - ], - ), - ), - ), - Expanded( - child: Container( - margin: EdgeInsets.only( - left: 4, - top: 2.5, - right: 2.5, - bottom: 2.5), - padding: EdgeInsets.all(5), - child: Column( - crossAxisAlignment: - CrossAxisAlignment.start, - children: [ - AppText( - TranslationBase.of(context).frequency, - fontSize: 1.7 * - SizeConfig.textMultiplier, - fontWeight: FontWeight.bold, - ), - AppText( - widget.myReferredPatientModel - .frequencyDescription, - fontSize: 1.7 * - SizeConfig.textMultiplier, - fontWeight: FontWeight.w300, - ) - ], - ), - ), - ) - ], - ), - TableRow(children: [ - Expanded( - child: Container( + Container( margin: EdgeInsets.all(2.5), padding: EdgeInsets.all(5), child: Column( crossAxisAlignment: - CrossAxisAlignment.start, + CrossAxisAlignment.start, children: [ AppText( - TranslationBase.of(context).priority, - fontSize: - 1.7 * SizeConfig.textMultiplier, + TranslationBase.of(context).referringClinic, + fontSize: 1.7 * + SizeConfig.textMultiplier, fontWeight: FontWeight.bold, ), AppText( - '${widget.myReferredPatientModel.priorityDescription}', - fontSize: - 1.7 * SizeConfig.textMultiplier, + '${widget.myReferredPatientModel.referralClinicDescription}', + fontSize: 1.7 * + SizeConfig.textMultiplier, fontWeight: FontWeight.w300, ) ], ), ), - ), - Expanded( - child: Container( + Container( margin: EdgeInsets.only( left: 4, top: 2.5, @@ -233,24 +170,75 @@ class _MyReferredPatientWidgetState extends State { padding: EdgeInsets.all(5), child: Column( crossAxisAlignment: - CrossAxisAlignment.start, + CrossAxisAlignment.start, children: [ AppText( - TranslationBase.of(context).maxResponseTime, - fontSize: - 1.7 * SizeConfig.textMultiplier, + TranslationBase.of(context).frequency, + fontSize: 1.7 * + SizeConfig.textMultiplier, fontWeight: FontWeight.bold, ), AppText( - Helpers.getDateFormatted(widget - .myReferredPatientModel - .maxResponseTime), - fontSize: - 1.7 * SizeConfig.textMultiplier, + widget.myReferredPatientModel + .frequencyDescription, + fontSize: 1.7 * + SizeConfig.textMultiplier, fontWeight: FontWeight.w300, ) ], ), + ) + ], + ), + TableRow(children: [ + Container( + margin: EdgeInsets.all(2.5), + padding: EdgeInsets.all(5), + child: Column( + crossAxisAlignment: + CrossAxisAlignment.start, + children: [ + AppText( + TranslationBase.of(context).priority, + fontSize: + 1.7 * SizeConfig.textMultiplier, + fontWeight: FontWeight.bold, + ), + AppText( + '${widget.myReferredPatientModel.priorityDescription}', + fontSize: + 1.7 * SizeConfig.textMultiplier, + fontWeight: FontWeight.w300, + ) + ], + ), + ), + Container( + margin: EdgeInsets.only( + left: 4, + top: 2.5, + right: 2.5, + bottom: 2.5), + padding: EdgeInsets.all(5), + child: Column( + crossAxisAlignment: + CrossAxisAlignment.start, + children: [ + AppText( + TranslationBase.of(context).maxResponseTime, + fontSize: + 1.7 * SizeConfig.textMultiplier, + fontWeight: FontWeight.bold, + ), + AppText( + Helpers.getDateFormatted(widget + .myReferredPatientModel + .maxResponseTime), + fontSize: + 1.7 * SizeConfig.textMultiplier, + fontWeight: FontWeight.w300, + ) + ], ), ) ])