working on referral card

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

@ -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: <TextSpan>[
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: <TextSpan>[
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: <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,
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: <TextSpan>[
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: <TextSpan>[
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: <TextSpan>[
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: <TextSpan>[
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: <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,
)) ,),
)
],
),
Container(
width: double.infinity,
alignment: Alignment.centerRight,
child: Icon(FontAwesomeIcons.arrowRight,
size: 25, color: Colors.black))
],
),
// onTap: onTap,
)),
),
),
],
),

Loading…
Cancel
Save