From 4f558dc41dfee8f6661be96022d2c900a8a4cc9e Mon Sep 17 00:00:00 2001 From: Elham Rababah Date: Thu, 25 Mar 2021 12:50:31 +0200 Subject: [PATCH 1/2] fix referral card --- lib/config/localized_values.dart | 2 +- .../referral/my-referral-patient-screen.dart | 50 +- .../referral/patient_referral_screen.dart | 1 + .../patient-referral-item-widget.dart | 576 ++++++++++++------ lib/widgets/shared/card_with_bg_widget.dart | 37 +- 5 files changed, 430 insertions(+), 236 deletions(-) diff --git a/lib/config/localized_values.dart b/lib/config/localized_values.dart index a1f63710..f30a86e5 100644 --- a/lib/config/localized_values.dart +++ b/lib/config/localized_values.dart @@ -328,7 +328,7 @@ const Map> localizedValues = { 'ar': 'لا وصفة طبية مدرجة' }, 'referTo': {'en': "Refer To", 'ar': 'محال إلى'}, - 'referredFrom': {'en': "Referred From", 'ar': 'محال من'}, + 'referredFrom': {'en': "From : ", 'ar': ' : من'}, 'branch': {'en': "Branch", 'ar': 'الفرع'}, 'chooseAppointment': {'en': "Choose Appointment", 'ar': 'اختر موعد'}, 'appointmentNo': {'en': "Appointment # : ", 'ar': '# الموعد:'}, diff --git a/lib/screens/patients/profile/referral/my-referral-patient-screen.dart b/lib/screens/patients/profile/referral/my-referral-patient-screen.dart index a888ad3e..f54ac5e6 100644 --- a/lib/screens/patients/profile/referral/my-referral-patient-screen.dart +++ b/lib/screens/patients/profile/referral/my-referral-patient-screen.dart @@ -23,6 +23,7 @@ class MyReferralPatientScreen extends StatelessWidget { builder: (_, model, w) => AppScaffold( baseViewModel: model, isShowAppBar: false, + appBarTitle: TranslationBase.of(context).referPatient, body: model.pendingReferral == null || model.pendingReferral.length == 0 ? Center( @@ -33,33 +34,35 @@ class MyReferralPatientScreen extends StatelessWidget { ) : SingleChildScrollView( child: Container( + // color: Colors.white, + height: MediaQuery.of(context).size.height, child: Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ SizedBox(height: 100), - ProfileWelcomeWidget( - AppText( - authProvider.selectedClinicName != null - ? authProvider.selectedClinicName - : authProvider.doctorProfile.clinicDescription, - fontSize: SizeConfig.textMultiplier * 1.7, - color: Colors.white, - textAlign: TextAlign.center, - ), - height: 100, - ), - SizedBox( - height: 16, - ), - Padding( - padding: const EdgeInsets.symmetric(horizontal: 16.0), - child: AppText( - TranslationBase.of(context).myReferralPatient, - color: Colors.black, - fontWeight: FontWeight.bold, - fontSize: 16, - ), - ), + // ProfileWelcomeWidget( + // AppText( + // authProvider.selectedClinicName != null + // ? authProvider.selectedClinicName + // : authProvider.doctorProfile.clinicDescription, + // fontSize: SizeConfig.textMultiplier * 1.7, + // color: Colors.white, + // textAlign: TextAlign.center, + // ), + // height: 100, + // ), + // SizedBox( + // height: 16, + // ), + // Padding( + // padding: const EdgeInsets.symmetric(horizontal: 16.0), + // child: AppText( + // TranslationBase.of(context).myReferralPatient, + // color: Colors.black, + // fontWeight: FontWeight.bold, + // fontSize: 16, + // ), + // ), ...List.generate( model.pendingReferral.length, (index) => InkWell( @@ -71,6 +74,7 @@ class MyReferralPatientScreen extends StatelessWidget { }, child: PatientReferralItemWidget( "${model.pendingReferral[index].patientID}", + patientInfo:model.pendingReferral[index] , patientName: model.pendingReferral[index].patientName, referralStatus: null, diff --git a/lib/screens/patients/profile/referral/patient_referral_screen.dart b/lib/screens/patients/profile/referral/patient_referral_screen.dart index 80f30aad..2906e196 100644 --- a/lib/screens/patients/profile/referral/patient_referral_screen.dart +++ b/lib/screens/patients/profile/referral/patient_referral_screen.dart @@ -37,6 +37,7 @@ class _PatientReferralScreen extends State appBarTitle: TranslationBase.of(context).patientsreferral, body: Scaffold( extendBodyBehindAppBar: true, + // backgroundColor: Colors.white, appBar: PreferredSize( preferredSize: Size.fromHeight(65.0), child: Center( diff --git a/lib/widgets/patients/patient-referral-item-widget.dart b/lib/widgets/patients/patient-referral-item-widget.dart index ee54917b..1f45485f 100644 --- a/lib/widgets/patients/patient-referral-item-widget.dart +++ b/lib/widgets/patients/patient-referral-item-widget.dart @@ -1,6 +1,11 @@ +import 'package:doctor_app_flutter/config/size_config.dart'; +import 'package:doctor_app_flutter/models/patient/my_referral/PendingReferral.dart'; import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart'; +import 'package:doctor_app_flutter/widgets/shared/card_with_bg_widget.dart'; +import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; +import 'package:font_awesome_flutter/font_awesome_flutter.dart'; class PatientReferralItemWidget extends StatelessWidget { final String patientName; @@ -14,6 +19,7 @@ class PatientReferralItemWidget extends StatelessWidget { final String referredOn; final String answerFromTarget; final Widget infoIcon; + final PendingReferral patientInfo; PatientReferralItemWidget( this.patientID, { @@ -27,6 +33,7 @@ class PatientReferralItemWidget extends StatelessWidget { this.referredOn, this.answerFromTarget, this.infoIcon, + this.patientInfo, }); @override @@ -35,222 +42,389 @@ class PatientReferralItemWidget extends StatelessWidget { margin: EdgeInsets.all(16.0), child: Column( children: [ - Row( - children: [ - Expanded( - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - if (referralStatus != null) + //TODO should be removed by mousa + // Row( + // children: [ + // Expanded( + // child: Column( + // crossAxisAlignment: CrossAxisAlignment.start, + // children: [ + // if (referralStatus != null) + // Row( + // children: [ + // AppText( + // TranslationBase.of(context).referralStatus, + // color: Colors.grey, + // fontWeight: FontWeight.bold, + // fontSize: 12, + // ), + // Container( + // color: Color(0xFF4BA821), + // padding: EdgeInsets.all(4), + // child: AppText( + // referralStatus + // /*referralStatus == "46" + // ? TranslationBase.of(context).approved + // : TranslationBase.of(context).rejected*/ + // , + // color: Colors.white, + // fontWeight: FontWeight.bold, + // fontSize: 12, + // ), + // ), + // ], + // ), + // SizedBox( + // height: 8, + // ), + // Row( + // children: [ + // AppText( + // isReferredTo + // ? "${TranslationBase.of(context).referTo}: " + // : "${TranslationBase.of(context).referredFrom}: ", + // color: Colors.grey, + // fontWeight: FontWeight.bold, + // fontSize: 12, + // ), + // AppText( + // isSameBranch + // ? TranslationBase.of(context).sameBranch + // : TranslationBase.of(context).otherBranch, + // color: Colors.black, + // fontWeight: FontWeight.bold, + // fontSize: 12, + // ), + // ], + // ), + // SizedBox( + // height: 8, + // ), + // Row( + // crossAxisAlignment: CrossAxisAlignment.start, + // children: [ + // AppText( + // "${TranslationBase.of(context).referralDoctor} : ", + // color: Colors.grey, + // fontWeight: FontWeight.bold, + // fontSize: 12, + // ), + // Expanded( + // child: AppText( + // referralDoctorName != null + // ? "${TranslationBase.of(context).dr} $referralDoctorName" + // : "-", + // color: Colors.black, + // fontWeight: FontWeight.bold, + // fontSize: 12, + // ), + // ), + // ], + // ), + // SizedBox( + // height: 8, + // ), + // if (clinicDescription != null) + // Row( + // children: [ + // AppText( + // "${TranslationBase.of(context).clinic}: ", + // color: Colors.grey, + // fontWeight: FontWeight.bold, + // fontSize: 12, + // ), + // AppText( + // clinicDescription, + // color: Colors.black, + // fontWeight: FontWeight.bold, + // fontSize: 12, + // ), + // ], + // ), + // SizedBox( + // height: 8, + // ), + // Row( + // children: [ + // AppText( + // "${TranslationBase.of(context).patientID}: ", + // color: Colors.grey, + // fontWeight: FontWeight.bold, + // fontSize: 12, + // ), + // AppText( + // patientID ?? '-', + // color: Colors.black, + // fontWeight: FontWeight.bold, + // fontSize: 12, + // ), + // ], + // ), + // SizedBox( + // height: 8, + // ), + // Row( + // children: [ + // AppText( + // "${TranslationBase.of(context).patientName}: ", + // color: Colors.grey, + // fontWeight: FontWeight.bold, + // fontSize: 12, + // ), + // AppText( + // patientName ?? '-', + // color: Colors.black, + // fontWeight: FontWeight.bold, + // fontSize: 12, + // ), + // ], + // ), + // SizedBox( + // height: 8, + // ), + // Row( + // crossAxisAlignment: CrossAxisAlignment.start, + // children: [ + // AppText( + // TranslationBase.of(context).referralRemark, + // color: Colors.grey, + // fontWeight: FontWeight.bold, + // fontSize: 12, + // ), + // Expanded( + // child: AppText( + // remark, + // color: Colors.black, + // fontWeight: FontWeight.bold, + // fontSize: 12, + // ), + // ), + // ], + // ), + // SizedBox( + // height: 8, + // ), + // Row( + // children: [ + // AppText( + // TranslationBase.of(context).referredOn, + // color: Colors.grey, + // fontWeight: FontWeight.bold, + // fontSize: 12, + // ), + // AppText( + // referredOn ?? '-', + // color: Colors.black, + // fontWeight: FontWeight.bold, + // fontSize: 12, + // ), + // ], + // ), + // if (answerFromTarget != null) + // SizedBox( + // height: 8, + // ), + // if (answerFromTarget != null) + // Row( + // children: [ + // AppText( + // TranslationBase.of(context).referralResponse, + // color: Colors.grey, + // fontWeight: FontWeight.bold, + // fontSize: 12, + // ), + // AppText( + // answerFromTarget != "" ? answerFromTarget : '-', + // color: Colors.black, + // fontWeight: FontWeight.bold, + // fontSize: 12, + // ), + // ], + // ), + // SizedBox( + // height: 16, + // ), + // ], + // ), + // ), + // if (infoIcon != null) infoIcon, + // ], + // ), + // const Divider( + // color: Color(0xffCCCCCC), + // height: 1, + // thickness: 1, + // indent: 0, + // endIndent: 0, + // ), + SizedBox( + height: 8, + ), + Container( + child: CardWithBgWidget( + bgColor: patientInfo.referralStatus =='Pending' + ? Colors.orange[400] + : Colors.red[800], + hasBorder: false, + widget:Container( + // padding: EdgeInsets.only(left: 20, right: 0, bottom: 0), + child: InkWell( + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + SizedBox( + height: 10, + ), Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ - AppText( - TranslationBase.of(context).referralStatus, - color: Colors.grey, - fontWeight: FontWeight.bold, - fontSize: 12, - ), - Container( - color: Color(0xFF4BA821), - padding: EdgeInsets.all(4), - child: AppText( - referralStatus - /*referralStatus == "46" - ? TranslationBase.of(context).approved - : TranslationBase.of(context).rejected*/ - , - color: Colors.white, - fontWeight: FontWeight.bold, - fontSize: 12, + RichText( + text: new TextSpan( + style: new TextStyle( + fontSize: 2.0 * SizeConfig.textMultiplier, + color: Colors.black), + children: [ + new TextSpan( + text: patientInfo.referralStatus, + style: TextStyle( + color: patientInfo.referralStatus =='Pending' + ? Colors.orange[400] + : Colors.red[800], + fontWeight: FontWeight.w700, + fontFamily: 'Poppins', + fontSize: 18)), + ], ), ), + //TODO :ask backend to return in the standerformate + AppText( + referredOn, + fontFamily: 'Poppins', + fontWeight: FontWeight.w600, + ) ], ), - SizedBox( - height: 8, - ), - Row( - children: [ - AppText( - isReferredTo - ? "${TranslationBase.of(context).referTo}: " - : "${TranslationBase.of(context).referredFrom}: ", - color: Colors.grey, - fontWeight: FontWeight.bold, - fontSize: 12, - ), - AppText( - isSameBranch - ? TranslationBase.of(context).sameBranch - : TranslationBase.of(context).otherBranch, - color: Colors.black, - fontWeight: FontWeight.bold, - fontSize: 12, - ), - ], - ), - SizedBox( - height: 8, - ), - Row( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - AppText( - "${TranslationBase.of(context).referralDoctor} : ", - color: Colors.grey, - fontWeight: FontWeight.bold, - fontSize: 12, + AppText( + patientInfo.patientName, + fontSize: SizeConfig.textMultiplier * 2, + fontWeight: FontWeight.bold, + backGroundcolor: Colors.white, + fontFamily: 'Poppins', + ), + SizedBox( + width: 10, + ), + RichText( + text: new TextSpan( + style: new TextStyle( + fontSize: 2.0 * SizeConfig.textMultiplier, + color: Colors.black), + children: [ + new TextSpan( + text: TranslationBase + .of(context) + .fileNumber, + style: TextStyle( + fontSize: 14, + fontFamily: 'Poppins')), + new TextSpan( + text: patientInfo.patientID.toString(), + style: TextStyle( + fontWeight: FontWeight.w700, + fontFamily: 'Poppins', + fontSize: 15)), + ], ), - Expanded( - child: AppText( - referralDoctorName != null - ? "${TranslationBase.of(context).dr} $referralDoctorName" - : "-", - color: Colors.black, - fontWeight: FontWeight.bold, - fontSize: 12, + ), + Container( + child: RichText( + text: new TextSpan( + style: new TextStyle( + fontSize: 2.0 * SizeConfig.textMultiplier, + color: Colors.black), + children: [ + new TextSpan( + text: TranslationBase + .of(context) + .referredFrom, + style: TextStyle( + fontSize: 14, + fontFamily: 'Poppins')), + new TextSpan( + text: isSameBranch + ? TranslationBase + .of(context) + .sameBranch + : TranslationBase + .of(context) + .otherBranch, + style: TextStyle( + fontWeight: FontWeight.w700, + fontFamily: 'Poppins', + fontSize: 15)), + ], ), ), - ], - ), - SizedBox( - height: 8, - ), - if (clinicDescription != null) - Row( - children: [ - AppText( - "${TranslationBase.of(context).clinic}: ", - color: Colors.grey, - fontWeight: FontWeight.bold, - fontSize: 12, - ), - AppText( - clinicDescription, - color: Colors.black, - fontWeight: FontWeight.bold, - fontSize: 12, - ), - ], ), - SizedBox( - height: 8, - ), - Row( - children: [ - AppText( - "${TranslationBase.of(context).patientID}: ", - color: Colors.grey, - fontWeight: FontWeight.bold, - fontSize: 12, - ), - AppText( - patientID ?? '-', - color: Colors.black, - fontWeight: FontWeight.bold, - fontSize: 12, - ), - ], - ), - SizedBox( - height: 8, - ), - Row( - children: [ - AppText( - "${TranslationBase.of(context).patientName}: ", - color: Colors.grey, - fontWeight: FontWeight.bold, - fontSize: 12, - ), - AppText( - patientName ?? '-', - color: Colors.black, - fontWeight: FontWeight.bold, - fontSize: 12, - ), - ], - ), - SizedBox( - height: 8, - ), - Row( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - AppText( - TranslationBase.of(context).referralRemark, - color: Colors.grey, - fontWeight: FontWeight.bold, - fontSize: 12, - ), - Expanded( - child: AppText( - remark, - color: Colors.black, - fontWeight: FontWeight.bold, - fontSize: 12, + Container( + child: RichText( + text: new TextSpan( + style: new TextStyle( + fontSize: 2.0 * SizeConfig.textMultiplier, + color: Colors.black), + children: [ + new TextSpan( + text: TranslationBase + .of(context) + .remarks + " : ", + style: TextStyle( + fontSize: 14, + fontFamily: 'Poppins')), + new TextSpan( + text: patientInfo.remarksFromSource, + style: TextStyle( + fontWeight: FontWeight.w700, + fontFamily: 'Poppins', + fontSize: 15)), + ], ), ), - ], - ), - SizedBox( - height: 8, - ), - Row( - children: [ - AppText( - TranslationBase.of(context).referredOn, - color: Colors.grey, - fontWeight: FontWeight.bold, - fontSize: 12, - ), - AppText( - referredOn ?? '-', - color: Colors.black, - fontWeight: FontWeight.bold, - fontSize: 12, - ), - ], - ), - if (answerFromTarget != null) - SizedBox( - height: 8, ), - if (answerFromTarget != null) + SizedBox(height: 20,), Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ - AppText( - TranslationBase.of(context).referralResponse, - color: Colors.grey, - fontWeight: FontWeight.bold, - fontSize: 12, - ), - AppText( - answerFromTarget != "" ? answerFromTarget : '-', - color: Colors.black, - fontWeight: FontWeight.bold, - fontSize: 12, - ), - ], - ), - SizedBox( - height: 16, - ), - ], - ), - ), - if (infoIcon != null) infoIcon, - ], - ), - const Divider( - color: Color(0xffCCCCCC), - height: 1, - thickness: 1, - indent: 0, - endIndent: 0, - ), - SizedBox( - height: 8, + + Column(children: [ + RichText( + text: new TextSpan( + style: new TextStyle( + fontSize: 2.0 * SizeConfig.textMultiplier, + color: Colors.black), + children: [ + new TextSpan( + text: TranslationBase + .of(context) + .referralDoctor + " : ", + style: TextStyle( + fontSize: 14, + fontFamily: 'Poppins')), + new TextSpan( + text: referralDoctorName, + style: TextStyle( + fontWeight: FontWeight.w700, + fontFamily: 'Poppins', + fontSize: 15)), + ], + ), + ) + ],), + Icon(FontAwesomeIcons.arrowRight, size: 25,color:Colors.black) + ],) + ], + ), + // onTap: onTap, + )) ,), ), ], ), diff --git a/lib/widgets/shared/card_with_bg_widget.dart b/lib/widgets/shared/card_with_bg_widget.dart index f7fd3637..4a274529 100644 --- a/lib/widgets/shared/card_with_bg_widget.dart +++ b/lib/widgets/shared/card_with_bg_widget.dart @@ -13,8 +13,11 @@ import 'package:provider/provider.dart'; class CardWithBgWidget extends StatelessWidget { final Widget widget; + final Color bgColor; + final bool hasBorder; - CardWithBgWidget({@required this.widget}); + CardWithBgWidget( + {@required this.widget, this.bgColor, this.hasBorder = true}); @override Widget build(BuildContext context) { @@ -26,7 +29,9 @@ class CardWithBgWidget extends StatelessWidget { borderRadius: BorderRadius.all( Radius.circular(10.0), ), - border: Border.all(color: HexColor('#707070'), width: 2.0), + border: Border.all( + color: hasBorder ? HexColor('#707070') : Colors.transparent, + width: hasBorder ? 2.0 : 0), ), child: Material( borderRadius: BorderRadius.all(Radius.circular(10.0)), @@ -34,23 +39,33 @@ class CardWithBgWidget extends StatelessWidget { children: [ if (projectProvider.isArabic) Positioned( - child: Container( + child: Container( + decoration: BoxDecoration( + color: bgColor ?? HexColor('#58434F'), + + borderRadius: BorderRadius.only( + topLeft: Radius.circular(10), + bottomLeft: Radius.circular(10),),), width: 10, - color: HexColor('#58434F'), ), - bottom: 0, - top: 0, - right: 0, + bottom: 1, + top: 1, + right: 1, ) else Positioned( child: Container( + decoration: BoxDecoration( + color: bgColor ?? HexColor('#58434F'), + + borderRadius: BorderRadius.only( + topLeft: Radius.circular(10), + bottomLeft: Radius.circular(10),),), width: 10, - color: HexColor('#58434F'), ), - bottom: 0, - top: 0, - left: 0, + bottom: 1, + top: 1, + left: 1, ), Container( padding: EdgeInsets.all(15.0), From ed104a4562ac8f97437674f644fe958c2b537809 Mon Sep 17 00:00:00 2001 From: mosazaid Date: Sun, 28 Mar 2021 10:29:07 +0300 Subject: [PATCH 2/2] working on referral card --- .../patient-referral-item-widget.dart | 252 +++++++++--------- 1 file changed, 121 insertions(+), 131 deletions(-) diff --git a/lib/widgets/patients/patient-referral-item-widget.dart b/lib/widgets/patients/patient-referral-item-widget.dart index 1f45485f..a218e864 100644 --- a/lib/widgets/patients/patient-referral-item-widget.dart +++ b/lib/widgets/patients/patient-referral-item-widget.dart @@ -42,7 +42,7 @@ class PatientReferralItemWidget extends StatelessWidget { margin: EdgeInsets.all(16.0), child: Column( children: [ - //TODO should be removed by mousa + // TODO should be removed by mousa // Row( // children: [ // Expanded( @@ -262,73 +262,91 @@ class PatientReferralItemWidget extends StatelessWidget { ), Container( child: CardWithBgWidget( - bgColor: patientInfo.referralStatus =='Pending' + bgColor: patientInfo.referralStatus == 'Pending' ? Colors.orange[400] : Colors.red[800], hasBorder: false, - widget:Container( - // padding: EdgeInsets.only(left: 20, right: 0, bottom: 0), - child: InkWell( - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - SizedBox( - height: 10, - ), - Row( - mainAxisAlignment: MainAxisAlignment.spaceBetween, - children: [ - RichText( - text: new TextSpan( - style: new TextStyle( - fontSize: 2.0 * SizeConfig.textMultiplier, - color: Colors.black), - children: [ - new TextSpan( - text: patientInfo.referralStatus, - style: TextStyle( - color: patientInfo.referralStatus =='Pending' - ? Colors.orange[400] - : Colors.red[800], - fontWeight: FontWeight.w700, - fontFamily: 'Poppins', - fontSize: 18)), - ], - ), + widget: Container( + // padding: EdgeInsets.only(left: 20, right: 0, bottom: 0), + child: InkWell( + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + + Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + RichText( + text: new TextSpan( + style: new TextStyle( + fontSize: 2.0 * SizeConfig.textMultiplier, + color: Colors.black), + children: [ + new TextSpan( + text: patientInfo.referralStatus, + style: TextStyle( + color: patientInfo.referralStatus == + 'Pending' + ? Colors.orange[400] + : Colors.red[800], + fontWeight: FontWeight.w700, + fontFamily: 'Poppins', + fontSize: 18)), + ], ), - //TODO :ask backend to return in the standerformate - AppText( - referredOn, - fontFamily: 'Poppins', - fontWeight: FontWeight.w600, - ) + ), + //TODO :ask backend to return in the standerformate + AppText( + referredOn, + fontFamily: 'Poppins', + fontWeight: FontWeight.w600, + ) + ], + ), + AppText( + patientInfo.patientName, + fontSize: SizeConfig.textMultiplier * 2, + fontWeight: FontWeight.bold, + backGroundcolor: Colors.white, + fontFamily: 'Poppins', + ), + SizedBox( + width: 10, + ), + RichText( + text: new TextSpan( + style: new TextStyle( + fontSize: 2.0 * SizeConfig.textMultiplier, + color: Colors.black), + children: [ + new TextSpan( + text: TranslationBase.of(context).fileNumber, + style: TextStyle( + fontSize: 14, fontFamily: 'Poppins')), + new TextSpan( + text: patientInfo.patientID.toString(), + style: TextStyle( + fontWeight: FontWeight.w700, + fontFamily: 'Poppins', + fontSize: 15)), ], ), - AppText( - patientInfo.patientName, - fontSize: SizeConfig.textMultiplier * 2, - fontWeight: FontWeight.bold, - backGroundcolor: Colors.white, - fontFamily: 'Poppins', - ), - SizedBox( - width: 10, - ), - RichText( + ), + Container( + child: RichText( text: new TextSpan( style: new TextStyle( fontSize: 2.0 * SizeConfig.textMultiplier, color: Colors.black), children: [ new TextSpan( - text: TranslationBase - .of(context) - .fileNumber, + text: TranslationBase.of(context).referredFrom, style: TextStyle( - fontSize: 14, - fontFamily: 'Poppins')), + fontSize: 14, fontFamily: 'Poppins')), new TextSpan( - text: patientInfo.patientID.toString(), + text: isSameBranch + ? TranslationBase.of(context).sameBranch + : TranslationBase.of(context).otherBranch, style: TextStyle( fontWeight: FontWeight.w700, fontFamily: 'Poppins', @@ -336,95 +354,67 @@ class PatientReferralItemWidget extends StatelessWidget { ], ), ), - Container( - child: RichText( - text: new TextSpan( - style: new TextStyle( - fontSize: 2.0 * SizeConfig.textMultiplier, - color: Colors.black), - children: [ - new TextSpan( - text: TranslationBase - .of(context) - .referredFrom, - style: TextStyle( - fontSize: 14, - fontFamily: 'Poppins')), - new TextSpan( - text: isSameBranch - ? TranslationBase - .of(context) - .sameBranch - : TranslationBase - .of(context) - .otherBranch, - style: TextStyle( - fontWeight: FontWeight.w700, - fontFamily: 'Poppins', - fontSize: 15)), - ], - ), + ), + Container( + child: RichText( + text: new TextSpan( + style: new TextStyle( + fontSize: 2.0 * SizeConfig.textMultiplier, + color: Colors.black), + children: [ + new TextSpan( + text: + TranslationBase.of(context).remarks + " : ", + style: TextStyle( + fontSize: 14, fontFamily: 'Poppins')), + new TextSpan( + text: patientInfo.remarksFromSource, + style: TextStyle( + fontWeight: FontWeight.w700, + fontFamily: 'Poppins', + fontSize: 15)), + ], ), ), - Container( - child: RichText( - text: new TextSpan( - style: new TextStyle( + ), + SizedBox( + height: 20, + ), + Column( + children: [ + RichText( + text: TextSpan( + style: TextStyle( fontSize: 2.0 * SizeConfig.textMultiplier, color: Colors.black), children: [ - new TextSpan( - text: TranslationBase - .of(context) - .remarks + " : ", + TextSpan( + text: TranslationBase.of(context) + .referralDoctor + + " : ", style: TextStyle( - fontSize: 14, - fontFamily: 'Poppins')), - new TextSpan( - text: patientInfo.remarksFromSource, + fontSize: 14, fontFamily: 'Poppins')), + TextSpan( + text: referralDoctorName, style: TextStyle( fontWeight: FontWeight.w700, fontFamily: 'Poppins', fontSize: 15)), ], ), - ), - ), - SizedBox(height: 20,), - Row( - mainAxisAlignment: MainAxisAlignment.spaceBetween, - children: [ - - Column(children: [ - RichText( - text: new TextSpan( - style: new TextStyle( - fontSize: 2.0 * SizeConfig.textMultiplier, - color: Colors.black), - children: [ - new TextSpan( - text: TranslationBase - .of(context) - .referralDoctor + " : ", - style: TextStyle( - fontSize: 14, - fontFamily: 'Poppins')), - new TextSpan( - text: referralDoctorName, - style: TextStyle( - fontWeight: FontWeight.w700, - fontFamily: 'Poppins', - fontSize: 15)), - ], - ), - ) - ],), - Icon(FontAwesomeIcons.arrowRight, size: 25,color:Colors.black) - ],) - ], - ), - // onTap: onTap, - )) ,), + ) + ], + ), + Container( + width: double.infinity, + alignment: Alignment.centerRight, + child: Icon(FontAwesomeIcons.arrowRight, + size: 25, color: Colors.black)) + ], + ), + // onTap: onTap, + )), + ), ), ], ),