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,73 +262,91 @@ 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(
), mainAxisAlignment: MainAxisAlignment.spaceBetween,
Row( children: [
mainAxisAlignment: MainAxisAlignment.spaceBetween, RichText(
children: [ text: new TextSpan(
RichText( style: new TextStyle(
text: new TextSpan( fontSize: 2.0 * SizeConfig.textMultiplier,
style: new TextStyle( color: Colors.black),
fontSize: 2.0 * SizeConfig.textMultiplier, children: <TextSpan>[
color: Colors.black), new TextSpan(
children: <TextSpan>[ text: patientInfo.referralStatus,
new TextSpan( style: TextStyle(
text: patientInfo.referralStatus, color: patientInfo.referralStatus ==
style: TextStyle( 'Pending'
color: patientInfo.referralStatus =='Pending' ? Colors.orange[400]
? Colors.orange[400] : Colors.red[800],
: Colors.red[800], fontWeight: FontWeight.w700,
fontWeight: FontWeight.w700, fontFamily: 'Poppins',
fontFamily: 'Poppins', fontSize: 18)),
fontSize: 18)), ],
],
),
), ),
//TODO :ask backend to return in the standerformate ),
AppText( //TODO :ask backend to return in the standerformate
referredOn, AppText(
fontFamily: 'Poppins', referredOn,
fontWeight: FontWeight.w600, 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: <TextSpan>[
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, Container(
fontSize: SizeConfig.textMultiplier * 2, child: RichText(
fontWeight: FontWeight.bold,
backGroundcolor: Colors.white,
fontFamily: 'Poppins',
),
SizedBox(
width: 10,
),
RichText(
text: new TextSpan( text: new TextSpan(
style: new TextStyle( style: new TextStyle(
fontSize: 2.0 * SizeConfig.textMultiplier, fontSize: 2.0 * SizeConfig.textMultiplier,
color: Colors.black), color: Colors.black),
children: <TextSpan>[ children: <TextSpan>[
new TextSpan( new TextSpan(
text: TranslationBase text: TranslationBase.of(context).referredFrom,
.of(context)
.fileNumber,
style: TextStyle( style: TextStyle(
fontSize: 14, fontSize: 14, fontFamily: 'Poppins')),
fontFamily: 'Poppins')),
new TextSpan( new TextSpan(
text: patientInfo.patientID.toString(), text: isSameBranch
? TranslationBase.of(context).sameBranch
: TranslationBase.of(context).otherBranch,
style: TextStyle( style: TextStyle(
fontWeight: FontWeight.w700, fontWeight: FontWeight.w700,
fontFamily: 'Poppins', fontFamily: 'Poppins',
@ -336,95 +354,67 @@ class PatientReferralItemWidget extends StatelessWidget {
], ],
), ),
), ),
Container( ),
child: RichText( Container(
text: new TextSpan( child: RichText(
style: new TextStyle( text: new TextSpan(
fontSize: 2.0 * SizeConfig.textMultiplier, style: new TextStyle(
color: Colors.black), fontSize: 2.0 * SizeConfig.textMultiplier,
children: <TextSpan>[ color: Colors.black),
new TextSpan( children: <TextSpan>[
text: TranslationBase new TextSpan(
.of(context) text:
.referredFrom, TranslationBase.of(context).remarks + " : ",
style: TextStyle( style: TextStyle(
fontSize: 14, fontSize: 14, fontFamily: 'Poppins')),
fontFamily: 'Poppins')), new TextSpan(
new TextSpan( text: patientInfo.remarksFromSource,
text: isSameBranch style: TextStyle(
? TranslationBase fontWeight: FontWeight.w700,
.of(context) fontFamily: 'Poppins',
.sameBranch fontSize: 15)),
: TranslationBase ],
.of(context)
.otherBranch,
style: TextStyle(
fontWeight: FontWeight.w700,
fontFamily: 'Poppins',
fontSize: 15)),
],
),
), ),
), ),
Container( ),
child: RichText( SizedBox(
text: new TextSpan( height: 20,
style: new TextStyle( ),
Column(
children: [
RichText(
text: TextSpan(
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 +
.remarks + " : ", " : ",
style: TextStyle( style: TextStyle(
fontSize: 14, fontSize: 14, fontFamily: 'Poppins')),
fontFamily: 'Poppins')), TextSpan(
new TextSpan( text: referralDoctorName,
text: patientInfo.remarksFromSource,
style: TextStyle( style: TextStyle(
fontWeight: FontWeight.w700, fontWeight: FontWeight.w700,
fontFamily: 'Poppins', fontFamily: 'Poppins',
fontSize: 15)), fontSize: 15)),
], ],
), ),
), )
), ],
SizedBox(height: 20,), ),
Row( Container(
mainAxisAlignment: MainAxisAlignment.spaceBetween, width: double.infinity,
children: [ alignment: Alignment.centerRight,
child: Icon(FontAwesomeIcons.arrowRight,
Column(children: [ size: 25, color: Colors.black))
RichText( ],
text: new TextSpan( ),
style: new TextStyle( // onTap: onTap,
fontSize: 2.0 * SizeConfig.textMultiplier, )),
color: Colors.black), ),
children: <TextSpan>[
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,
)) ,),
), ),
], ],
), ),

Loading…
Cancel
Save