working on referral card

merge-requests/377/head
mosazaid 5 years ago
parent 4f558dc41d
commit ed104a4562

@ -42,7 +42,7 @@ class PatientReferralItemWidget extends StatelessWidget {
margin: EdgeInsets.all(16.0), margin: EdgeInsets.all(16.0),
child: Column( child: Column(
children: [ children: [
//TODO should be removed by mousa // TODO should be removed by mousa
// Row( // Row(
// children: [ // children: [
// Expanded( // Expanded(
@ -262,19 +262,17 @@ class PatientReferralItemWidget extends StatelessWidget {
), ),
Container( Container(
child: CardWithBgWidget( child: CardWithBgWidget(
bgColor: patientInfo.referralStatus =='Pending' bgColor: patientInfo.referralStatus == 'Pending'
? Colors.orange[400] ? Colors.orange[400]
: Colors.red[800], : Colors.red[800],
hasBorder: false, hasBorder: false,
widget:Container( widget: Container(
// padding: EdgeInsets.only(left: 20, right: 0, bottom: 0), // padding: EdgeInsets.only(left: 20, right: 0, bottom: 0),
child: InkWell( child: InkWell(
child: Column( child: Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
SizedBox(
height: 10,
),
Row( Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween, mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [ children: [
@ -287,7 +285,8 @@ class PatientReferralItemWidget extends StatelessWidget {
new TextSpan( new TextSpan(
text: patientInfo.referralStatus, text: patientInfo.referralStatus,
style: TextStyle( style: TextStyle(
color: patientInfo.referralStatus =='Pending' color: patientInfo.referralStatus ==
'Pending'
? Colors.orange[400] ? Colors.orange[400]
: Colors.red[800], : Colors.red[800],
fontWeight: FontWeight.w700, fontWeight: FontWeight.w700,
@ -321,12 +320,9 @@ class PatientReferralItemWidget extends StatelessWidget {
color: Colors.black), color: Colors.black),
children: <TextSpan>[ children: <TextSpan>[
new TextSpan( new TextSpan(
text: TranslationBase text: TranslationBase.of(context).fileNumber,
.of(context)
.fileNumber,
style: TextStyle( style: TextStyle(
fontSize: 14, fontSize: 14, fontFamily: 'Poppins')),
fontFamily: 'Poppins')),
new TextSpan( new TextSpan(
text: patientInfo.patientID.toString(), text: patientInfo.patientID.toString(),
style: TextStyle( style: TextStyle(
@ -344,20 +340,13 @@ class PatientReferralItemWidget extends StatelessWidget {
color: Colors.black), color: Colors.black),
children: <TextSpan>[ children: <TextSpan>[
new TextSpan( new TextSpan(
text: TranslationBase text: TranslationBase.of(context).referredFrom,
.of(context)
.referredFrom,
style: TextStyle( style: TextStyle(
fontSize: 14, fontSize: 14, fontFamily: 'Poppins')),
fontFamily: 'Poppins')),
new TextSpan( new TextSpan(
text: isSameBranch text: isSameBranch
? TranslationBase ? TranslationBase.of(context).sameBranch
.of(context) : TranslationBase.of(context).otherBranch,
.sameBranch
: TranslationBase
.of(context)
.otherBranch,
style: TextStyle( style: TextStyle(
fontWeight: FontWeight.w700, fontWeight: FontWeight.w700,
fontFamily: 'Poppins', fontFamily: 'Poppins',
@ -374,12 +363,10 @@ class PatientReferralItemWidget extends StatelessWidget {
color: Colors.black), color: Colors.black),
children: <TextSpan>[ children: <TextSpan>[
new TextSpan( new TextSpan(
text: TranslationBase text:
.of(context) TranslationBase.of(context).remarks + " : ",
.remarks + " : ",
style: TextStyle( style: TextStyle(
fontSize: 14, fontSize: 14, fontFamily: 'Poppins')),
fontFamily: 'Poppins')),
new TextSpan( new TextSpan(
text: patientInfo.remarksFromSource, text: patientInfo.remarksFromSource,
style: TextStyle( style: TextStyle(
@ -390,26 +377,24 @@ class PatientReferralItemWidget extends StatelessWidget {
), ),
), ),
), ),
SizedBox(height: 20,), SizedBox(
Row( height: 20,
mainAxisAlignment: MainAxisAlignment.spaceBetween, ),
Column(
children: [ children: [
Column(children: [
RichText( RichText(
text: new TextSpan( text: TextSpan(
style: new TextStyle( style: TextStyle(
fontSize: 2.0 * SizeConfig.textMultiplier, fontSize: 2.0 * SizeConfig.textMultiplier,
color: Colors.black), color: Colors.black),
children: <TextSpan>[ children: <TextSpan>[
new TextSpan( TextSpan(
text: TranslationBase text: TranslationBase.of(context)
.of(context) .referralDoctor +
.referralDoctor + " : ", " : ",
style: TextStyle( style: TextStyle(
fontSize: 14, fontSize: 14, fontFamily: 'Poppins')),
fontFamily: 'Poppins')), TextSpan(
new TextSpan(
text: referralDoctorName, text: referralDoctorName,
style: TextStyle( style: TextStyle(
fontWeight: FontWeight.w700, fontWeight: FontWeight.w700,
@ -418,13 +403,18 @@ class PatientReferralItemWidget extends StatelessWidget {
], ],
), ),
) )
],), ],
Icon(FontAwesomeIcons.arrowRight, size: 25,color:Colors.black) ),
],) Container(
width: double.infinity,
alignment: Alignment.centerRight,
child: Icon(FontAwesomeIcons.arrowRight,
size: 25, color: Colors.black))
], ],
), ),
// onTap: onTap, // onTap: onTap,
)) ,), )),
),
), ),
], ],
), ),

Loading…
Cancel
Save