Merge branch 'design-fixes' into 'development'

design fixes

See merge request Cloud_Solution/doctor_app_flutter!841
merge-requests/842/merge
Mohammad Aljammal 5 years ago
commit 6002e22d6d

@ -551,7 +551,7 @@ const Map<String, Map<String, String>> localizedValues = {
"sendSuc": {"en": "A copy has been sent to the email", "ar": "تم إرسال نسخة إلى البريد الإلكتروني"}, "sendSuc": {"en": "A copy has been sent to the email", "ar": "تم إرسال نسخة إلى البريد الإلكتروني"},
"SpecialResult": {"en": "Special Result", "ar": "نتيجة خاصة"}, "SpecialResult": {"en": "Special Result", "ar": "نتيجة خاصة"},
"noDataAvailable": {"en": "No data available", "ar": " لا يوجد بيانات متاحة "}, "noDataAvailable": {"en": "No data available", "ar": " لا يوجد بيانات متاحة "},
"show-more-btn": {"en": "Flow Chart", "ar": "النتائج التراكمية"}, "show-more-btn": {"en": "Flowchart", "ar": "النتائج التراكمية"},
"open-rad": {"en": "Open Radiology Image", "ar": "فتح صور الاشعة"}, "open-rad": {"en": "Open Radiology Image", "ar": "فتح صور الاشعة"},
"fileNumber": {"en": "File Number: ", "ar": "رقم الملف : "}, "fileNumber": {"en": "File Number: ", "ar": "رقم الملف : "},
"searchPatient-name": {"en": "Search Name, Medical File, Phone Number", "ar": "اسم البحث ، الملف الطبي ، رقم الهاتف"}, "searchPatient-name": {"en": "Search Name, Medical File, Phone Number", "ar": "اسم البحث ، الملف الطبي ، رقم الهاتف"},

@ -32,6 +32,7 @@ class ListOfAllInPatient extends StatelessWidget {
patientSearchViewModel.filteredInPatientItems.length, patientSearchViewModel.filteredInPatientItems.length,
scrollDirection: Axis.vertical, scrollDirection: Axis.vertical,
shrinkWrap: true, shrinkWrap: true,
physics: const AlwaysScrollableScrollPhysics (),
itemBuilder: (context, index) { itemBuilder: (context, index) {
return PatientCard( return PatientCard(
patientInfo: patientSearchViewModel patientInfo: patientSearchViewModel

@ -1,3 +1,4 @@
import 'package:doctor_app_flutter/config/size_config.dart';
import 'package:doctor_app_flutter/core/model/labs/lab_result.dart'; import 'package:doctor_app_flutter/core/model/labs/lab_result.dart';
import 'package:doctor_app_flutter/core/model/labs/patient_lab_orders.dart'; import 'package:doctor_app_flutter/core/model/labs/patient_lab_orders.dart';
import 'package:doctor_app_flutter/core/viewModel/project_view_model.dart'; import 'package:doctor_app_flutter/core/viewModel/project_view_model.dart';
@ -44,7 +45,11 @@ class LabResultWidget extends StatelessWidget {
children: [ children: [
Row( Row(
children: [ children: [
AppText(filterName), AppText(
filterName,
fontSize: SizeConfig.textMultiplier * 2.0,
fontWeight: FontWeight.w700,
),
], ],
), ),
// InkWell( // InkWell(
@ -69,6 +74,9 @@ class LabResultWidget extends StatelessWidget {
// ), // ),
], ],
), ),
SizedBox(
height: 8,
),
Row( Row(
children: [ children: [
Expanded( Expanded(
@ -77,7 +85,8 @@ class LabResultWidget extends StatelessWidget {
child: AppText( child: AppText(
TranslationBase.of(context).description, TranslationBase.of(context).description,
color: Colors.black, color: Colors.black,
bold: true, fontSize: SizeConfig.textMultiplier * 2.0,
fontWeight: FontWeight.w700,
), ),
), ),
), ),
@ -88,7 +97,8 @@ class LabResultWidget extends StatelessWidget {
child: AppText( child: AppText(
TranslationBase.of(context).value, TranslationBase.of(context).value,
color: Colors.black, color: Colors.black,
bold: true, fontSize: SizeConfig.textMultiplier * 2.0,
fontWeight: FontWeight.w700,
), ),
), ),
), ),
@ -98,16 +108,19 @@ class LabResultWidget extends StatelessWidget {
child: Center( child: Center(
child: AppText( child: AppText(
TranslationBase.of(context).range, TranslationBase.of(context).range,
color: Colors.black, fontSize: SizeConfig.textMultiplier * 2.0,
bold: true, fontWeight: FontWeight.w700,
), ),
), ),
), ),
),
Expanded(
child: Container(),
) )
], ],
), ),
SizedBox( SizedBox(
height: 7, height: 4,
), ),
Divider( Divider(
color: Colors.black, color: Colors.black,
@ -117,107 +130,132 @@ class LabResultWidget extends StatelessWidget {
height: 12, height: 12,
), ),
...List.generate( ...List.generate(
patientLabResultList.length, patientLabResultList.length,
(index) => Column( (index) => Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [
Container(
decoration: BoxDecoration(
shape: BoxShape.rectangle,
color: Color(0XFFF2F2F2),
borderRadius: BorderRadius.all(
Radius.circular(8.0),
),
),
child: Row(
children: [ children: [
Row( Expanded(
children: [ child: Container(
Expanded( padding: EdgeInsets.all(10),
child: Container( child: Center(
padding: EdgeInsets.all(10), child: AppText(
color: Colors.white, /*'${patientLabResultList[index].testCode}\n' +*/
child: Center( patientLabResultList[index].description,
child: AppText( textAlign: TextAlign.center,
'${patientLabResultList[index].testCode}\n' + fontSize: SizeConfig.textMultiplier * 1.8,
patientLabResultList[index].description, isCopyable: true,
textAlign: TextAlign.center,
isCopyable: true,
),
),
), ),
), ),
Expanded( ),
child: Container( ),
padding: EdgeInsets.all(10), Expanded(
color: Colors.white, child: Row(
child: Center( children: [
child: AppText( Container(
patientLabResultList[index].resultValue ?? decoration: BoxDecoration(
"" + shape: BoxShape.circle,
" " + color: Colors.red.shade700,
"${patientLabResultList[index].uOM ?? ""}", // borderRadius: BorderRadius.all(
textAlign: TextAlign.center, // Radius.circular(25.0),
isCopyable: true, // ),
),
child: Icon(
Icons.arrow_circle_up_sharp,
),
),
Expanded(
child: Container(
padding: EdgeInsets.all(10),
child: Center(
child: AppText(
patientLabResultList[index].resultValue ??
"" +
" " +
"${patientLabResultList[index].uOM ?? ""}",
textAlign: TextAlign.center,
isCopyable: true,
fontSize: SizeConfig.textMultiplier * 1.8,
),
), ),
), ),
), ),
],
),
),
Expanded(
child: Container(
padding: EdgeInsets.all(10),
// color: Colors.white,
child: Center(
child: AppText(
patientLabResultList[index].referanceRange,
textAlign: TextAlign.center,
fontSize: SizeConfig.textMultiplier * 1.8,
isCopyable: true,
),
), ),
Expanded( ),
child: Column( ),
children: [ Expanded(
Container( child: Container(
padding: EdgeInsets.all(10), child: InkWell(
color: Colors.white, onTap: () {
child: Center( Navigator.push(
child: AppText( context,
patientLabResultList[index].referanceRange, FadePage(
textAlign: TextAlign.center, page: FlowChartPage(
isCopyable: true, filterName:
), patientLabResultList[index].description,
patientLabOrder: patientLabOrder,
patient: patient,
isInpatient: isInpatient,
), ),
// page: LabResultHistoryPage(
// filterName: patientLabResultList[index].description,
// patientLabOrder: patientLabOrder,
// patient: patient,
// ),
), ),
SizedBox( );
height: 12, },
child: Row(
mainAxisAlignment: MainAxisAlignment.center,
children: [
AppText(
TranslationBase.of(context).showMoreBtn,
textDecoration: TextDecoration.underline,
color: Colors.red.shade700,
fontSize: SizeConfig.textMultiplier * 1.8,
fontWeight: FontWeight.w700,
), ),
InkWell(
onTap: () {
Navigator.push(
context,
FadePage(
page: FlowChartPage(
filterName:
patientLabResultList[index].description,
patientLabOrder: patientLabOrder,
patient: patient,
isInpatient: isInpatient,
),
// page: LabResultHistoryPage(
// filterName: patientLabResultList[index].description,
// patientLabOrder: patientLabOrder,
// patient: patient,
// ),
),
);
},
// child: AppText(
// " (show details)",
// color: Colors.blue,
// fontSize: 12,
// ),
child: Row(
mainAxisAlignment: MainAxisAlignment.center,
children: [
AppText(
TranslationBase.of(context).showMoreBtn,
textDecoration: TextDecoration.underline,
color: Colors.blue,
fontSize: 12,
),
],
),
)
], ],
), ),
), ),
], ),
), ),
// SizedBox(
// height: 12,
// ),
Divider(),
], ],
)) ),
),
SizedBox(
height: 4,
),
],
),
),
SizedBox(
height: 6,
),
Divider(),
// Table( // Table(
// border: TableBorder.symmetric( // border: TableBorder.symmetric(
// inside: BorderSide(width: 2.0, color: Colors.grey[300],style: BorderStyle.solid), // inside: BorderSide(width: 2.0, color: Colors.grey[300],style: BorderStyle.solid),

@ -1,3 +1,4 @@
import 'package:doctor_app_flutter/config/size_config.dart';
import 'package:doctor_app_flutter/core/model/labs/patient_lab_orders.dart'; import 'package:doctor_app_flutter/core/model/labs/patient_lab_orders.dart';
import 'package:doctor_app_flutter/core/viewModel/labs_view_model.dart'; import 'package:doctor_app_flutter/core/viewModel/labs_view_model.dart';
import 'package:doctor_app_flutter/core/viewModel/project_view_model.dart'; import 'package:doctor_app_flutter/core/viewModel/project_view_model.dart';
@ -84,17 +85,18 @@ class _LaboratoryResultWidgetState extends State<LaboratoryResultWidget> {
color: Colors.white, color: Colors.white,
borderRadius: BorderRadius.all( borderRadius: BorderRadius.all(
Radius.circular(5.0), Radius.circular(5.0),
)), ),),
child: Row( child: Row(
children: <Widget>[ children: <Widget>[
Expanded( Expanded(
child: Container( child: Container(
margin: EdgeInsets.only( margin: EdgeInsets.only(
left: 10, right: 10), left: 0, right: 0),
child: AppText( child: AppText(
TranslationBase.of(context) TranslationBase.of(context)
.generalResult, .generalResult,
bold: true, fontSize: SizeConfig.textMultiplier * 2.3,
bold: false,
))), ))),
Container( Container(
width: 25, width: 25,
@ -141,7 +143,7 @@ class _LaboratoryResultWidgetState extends State<LaboratoryResultWidget> {
patient: widget.patient, patient: widget.patient,
isInpatient: widget.isInpatient, isInpatient: widget.isInpatient,
), ),
) ),
], ],
), ),
), ),
@ -149,7 +151,7 @@ class _LaboratoryResultWidgetState extends State<LaboratoryResultWidget> {
], ],
), ),
) )
else else if (widget.details == null)
Container( Container(
child: ErrorMessage( child: ErrorMessage(
error: TranslationBase.of(context).noDataAvailable, error: TranslationBase.of(context).noDataAvailable,

@ -6,3 +6,17 @@ extension Extension on Object {
bool isNullEmptyZeroOrFalse() => bool isNullEmptyZeroOrFalse() =>
this == null || this == '' || !this || this == 0; this == null || this == '' || !this || this == 0;
} }
/// truncate the [String] without cutting words. The length is calculated with the suffix.
extension Truncate on String {
String truncate(int max, {String suffix = ''}) {
try {
return length <= max
? this
: '${substring(0, max - suffix.length)}$suffix';
} catch (e){
return this;
}
}
}

@ -10,6 +10,7 @@ import 'package:doctor_app_flutter/widgets/shared/user-guid/CusomRow.dart';
import 'package:flutter/cupertino.dart'; import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:cached_network_image/cached_network_image.dart'; import 'package:cached_network_image/cached_network_image.dart';
import '../../../util/extenstions.dart';
import 'ShowTimer.dart'; import 'ShowTimer.dart';
@ -37,6 +38,15 @@ class PatientCard extends StatelessWidget {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
String nationalityName = patientInfo.nationalityName != null
? patientInfo.nationalityName.trim()
: patientInfo.nationality != null
? patientInfo.nationality.trim()
: patientInfo.nationalityId !=
null
? patientInfo.nationalityId
: "";
return Container( return Container(
width: SizeConfig.screenWidth * 0.9, width: SizeConfig.screenWidth * 0.9,
margin: EdgeInsets.all(6), margin: EdgeInsets.all(6),
@ -82,7 +92,8 @@ class PatientCard extends StatelessWidget {
? Row( ? Row(
children: [ children: [
AppText( AppText(
TranslationBase.of(context).arrivedP, TranslationBase.of(context)
.arrivedP,
color: Colors.green, color: Colors.green,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
fontFamily: 'Poppins', fontFamily: 'Poppins',
@ -102,8 +113,12 @@ class PatientCard extends StatelessWidget {
width: 8, width: 8,
), ),
AppText( AppText(
patientInfo.status == 2 ? 'Confirmed' : 'Booked', patientInfo.status == 2
color: patientInfo.status == 2 ? Colors.green : Colors.grey, ? 'Confirmed'
: 'Booked',
color: patientInfo.status == 2
? Colors.green
: Colors.grey,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
fontFamily: 'Poppins', fontFamily: 'Poppins',
fontSize: 10, fontSize: 10,
@ -114,7 +129,8 @@ class PatientCard extends StatelessWidget {
? Row( ? Row(
children: [ children: [
AppText( AppText(
TranslationBase.of(context).notArrived, TranslationBase.of(context)
.notArrived,
color: Colors.red[800], color: Colors.red[800],
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
fontFamily: 'Poppins', fontFamily: 'Poppins',
@ -134,19 +150,27 @@ class PatientCard extends StatelessWidget {
width: 8, width: 8,
), ),
AppText( AppText(
patientInfo.status == 2 ? 'Confirmed' : 'Booked', patientInfo.status == 2
color: patientInfo.status == 2 ? Colors.green : Colors.grey, ? 'Confirmed'
: 'Booked',
color: patientInfo.status == 2
? Colors.green
: Colors.grey,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
fontFamily: 'Poppins', fontFamily: 'Poppins',
fontSize: 10, fontSize: 10,
), ),
], ],
) )
: !isFromSearch && !isFromLiveCare && patientInfo.patientStatusType == null : !isFromSearch &&
!isFromLiveCare &&
patientInfo.patientStatusType ==
null
? Row( ? Row(
children: [ children: [
AppText( AppText(
TranslationBase.of(context).notArrived, TranslationBase.of(context)
.notArrived,
color: Colors.red[800], color: Colors.red[800],
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
fontFamily: 'Poppins', fontFamily: 'Poppins',
@ -166,8 +190,13 @@ class PatientCard extends StatelessWidget {
width: 8, width: 8,
), ),
AppText( AppText(
patientInfo.status == 2 ? 'Booked' : 'Confirmed', patientInfo.status == 2
color: patientInfo.status == 2 ? Colors.grey : Colors.green, ? 'Booked'
: 'Confirmed',
color:
patientInfo.status == 2
? Colors.grey
: Colors.green,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
fontFamily: 'Poppins', fontFamily: 'Poppins',
fontSize: 12, fontSize: 12,
@ -177,13 +206,17 @@ class PatientCard extends StatelessWidget {
: SizedBox(), : SizedBox(),
this.arrivalType == '1' this.arrivalType == '1'
? AppText( ? AppText(
patientInfo.startTime != null ? patientInfo.startTime : patientInfo.startTimes, patientInfo.startTime != null
? patientInfo.startTime
: patientInfo.startTimes,
fontFamily: 'Poppins', fontFamily: 'Poppins',
fontWeight: FontWeight.w400, fontWeight: FontWeight.w400,
) )
: patientInfo.arrivedOn != null : patientInfo.arrivedOn != null
? AppText( ? AppText(
AppDateUtils.getDayMonthYearDate(AppDateUtils.convertStringToDate( AppDateUtils.getDayMonthYearDate(
AppDateUtils
.convertStringToDate(
patientInfo.arrivedOn, patientInfo.arrivedOn,
)) + )) +
" " + " " +
@ -192,8 +225,10 @@ class PatientCard extends StatelessWidget {
fontWeight: FontWeight.w400, fontWeight: FontWeight.w400,
fontSize: 15, fontSize: 15,
) )
: (patientInfo.appointmentDate != null && : (patientInfo.appointmentDate !=
patientInfo.appointmentDate.isNotEmpty) null &&
patientInfo
.appointmentDate.isNotEmpty)
? AppText( ? AppText(
"${AppDateUtils.getDayMonthYearDate(AppDateUtils.convertStringToDate( "${AppDateUtils.getDayMonthYearDate(AppDateUtils.convertStringToDate(
patientInfo.appointmentDate, patientInfo.appointmentDate,
@ -224,71 +259,89 @@ class PatientCard extends StatelessWidget {
Padding( Padding(
padding: EdgeInsets.only(left: 12.0), padding: EdgeInsets.only(left: 12.0),
child: Row( child: Row(
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisAlignment: MainAxisAlignment.spaceBetween, mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [ children: [
Expanded( Expanded(
child: Row(children: [ flex: 2,
Expanded( child: Row(
// width: MediaQuery.of(context).size.width*0.51, crossAxisAlignment: CrossAxisAlignment.start,
child: AppText( mainAxisAlignment:
isFromLiveCare MainAxisAlignment.start,
? Helpers.capitalize(patientInfo.fullName) children: [
: (Helpers.capitalize(patientInfo.firstName) + Expanded(
" " + // width: MediaQuery.of(context).size.width*0.51,
Helpers.capitalize(patientInfo.lastName)), child: AppText(
fontSize: 16, isFromLiveCare
color: Color(0xff2e303a), ? Helpers.capitalize(
fontWeight: FontWeight.w700, patientInfo.fullName)
fontFamily: 'Poppins', : (Helpers.capitalize(
textOverflow: TextOverflow.ellipsis, patientInfo.firstName) +
), " " +
), Helpers.capitalize(
if (patientInfo.gender == 1) patientInfo.lastName)),
Icon( fontSize: 16,
DoctorApp.male_2, color: Color(0xff2e303a),
color: Colors.blue, fontWeight: FontWeight.w700,
) fontFamily: 'Poppins',
else textOverflow: TextOverflow.ellipsis,
Icon( ),
DoctorApp.female_1, ),
color: Colors.pink, if (patientInfo.gender == 1)
), Icon(
if (isFromLiveCare) DoctorApp.male_2,
ShowTimer( color: Colors.blue,
patientInfo: patientInfo, )
), else
]), Icon(
DoctorApp.female_1,
color: Colors.pink,
),
if (isFromLiveCare)
ShowTimer(
patientInfo: patientInfo,
),
]),
), ),
Row( Expanded(
children: [ child: Row(
AppText( mainAxisAlignment: MainAxisAlignment.end,
patientInfo.nationalityName != null crossAxisAlignment: CrossAxisAlignment.start,
? patientInfo.nationalityName.trim() children: [
: patientInfo.nationality != null Expanded(
? patientInfo.nationality.trim() child: Container(
: patientInfo.nationalityId != null alignment: Alignment.centerRight,
? patientInfo.nationalityId child: AppText(
: "", nationalityName.truncate(14),
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
fontSize: 14, fontSize: 14,
textOverflow: TextOverflow.ellipsis, textOverflow: TextOverflow.ellipsis,
), ),
patientInfo.nationality != null || patientInfo.nationalityId != null ),
? ClipRRect( ),
borderRadius: BorderRadius.circular(20.0), patientInfo.nationality != null ||
child: CachedNetworkImage( patientInfo.nationalityId != null
imageUrl: patientInfo.nationalityFlagURL != null ? ClipRRect(
? patientInfo.nationalityFlagURL borderRadius:
: '', BorderRadius.circular(20.0),
height: 25, child: CachedNetworkImage(
width: 30, imageUrl: patientInfo
errorWidget: (context, url, error) => AppText( .nationalityFlagURL !=
'No Image', null
fontSize: 10, ? patientInfo.nationalityFlagURL
), : '',
)) height: 25,
: SizedBox() width: 30,
], errorWidget:
(context, url, error) =>
AppText(
'No Image',
fontSize: 10,
),
))
: SizedBox()
],
),
) )
], ],
)), )),
@ -332,12 +385,13 @@ class PatientCard extends StatelessWidget {
value: value:
"${AppDateUtils.getAgeByBirthday(patientInfo.dateofBirth, context, isServerFormat: !isFromLiveCare)}", "${AppDateUtils.getAgeByBirthday(patientInfo.dateofBirth, context, isServerFormat: !isFromLiveCare)}",
), ),
if (isInpatient) if (isInpatient)
CustomRow( CustomRow(
label: patientInfo.admissionDate == null label: patientInfo.admissionDate == null
? "" ? ""
: TranslationBase.of(context).admissionDate + " : ", : TranslationBase.of(context)
.admissionDate +
" : ",
value: patientInfo.admissionDate == null value: patientInfo.admissionDate == null
? "" ? ""
: "${AppDateUtils.convertDateFromServerFormat(patientInfo.admissionDate.toString(), 'yyyy-MM-dd')}", : "${AppDateUtils.convertDateFromServerFormat(patientInfo.admissionDate.toString(), 'yyyy-MM-dd')}",
@ -352,9 +406,9 @@ class PatientCard extends StatelessWidget {
), ),
if (patientInfo.admissionDate != null) if (patientInfo.admissionDate != null)
CustomRow( CustomRow(
label: label: TranslationBase.of(context)
TranslationBase.of(context).clinicName + .clinicName +
" : ", " : ",
value: "${patientInfo.clinicDescription}", value: "${patientInfo.clinicDescription}",
), ),
if (patientInfo.admissionDate != null) if (patientInfo.admissionDate != null)
@ -399,29 +453,36 @@ class PatientCard extends StatelessWidget {
], ],
) )
: !isInpatient && !isFromSearch : !isInpatient && !isFromSearch
? Row(mainAxisAlignment: MainAxisAlignment.end, children: [ ? Row(
Container( mainAxisAlignment: MainAxisAlignment.end,
padding: EdgeInsets.all(4), children: [
child: Image.asset(
patientInfo.appointmentType == 'Regular' && patientInfo.visitTypeId == 100
? 'assets/images/livecare.png'
: patientInfo.appointmentType == 'Walkin'
? 'assets/images/walkin.png'
: 'assets/images/booked.png',
height: 25,
width: 35,
)),
])
: (isInpatient == true)
? Row(mainAxisAlignment: MainAxisAlignment.end, children: [
Container( Container(
padding: EdgeInsets.all(4), padding: EdgeInsets.all(4),
child: Image.asset( child: Image.asset(
'assets/images/inpatient.png', patientInfo.appointmentType ==
'Regular' &&
patientInfo.visitTypeId == 100
? 'assets/images/livecare.png'
: patientInfo.appointmentType ==
'Walkin'
? 'assets/images/walkin.png'
: 'assets/images/booked.png',
height: 25, height: 25,
width: 35, width: 35,
)), )),
]) ])
: (isInpatient == true)
? Row(
mainAxisAlignment: MainAxisAlignment.end,
children: [
Container(
padding: EdgeInsets.all(4),
child: Image.asset(
'assets/images/inpatient.png',
height: 25,
width: 35,
)),
])
: SizedBox() : SizedBox()
], ],
), ),

@ -53,7 +53,7 @@ class PatientProfileHeaderNewDesignAppBar extends StatelessWidget
), ),
height: height == 0 height: height == 0
? isInpatient ? isInpatient
? 215 ? 220
: 200 : 200
: height, : height,
child: Container( child: Container(
@ -245,37 +245,46 @@ class PatientProfileHeaderNewDesignAppBar extends StatelessWidget
), ),
), ),
Row( Row(
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisAlignment: MainAxisAlignment.spaceBetween, mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [ children: [
HeaderRow( HeaderRow(
label: TranslationBase.of(context).fileNumber, label: TranslationBase.of(context).fileNumber,
value: patient.patientId.toString(), value: patient.patientId.toString(),
), ),
Row( Expanded(
children: [ child: Row(
AppText( crossAxisAlignment: CrossAxisAlignment.start,
patient.nationalityName ?? children: [
patient.nationality ?? Expanded(
patient.nationalityId ?? child: Container(
'', alignment: Alignment.centerRight,
fontWeight: FontWeight.bold, child: AppText(
fontSize: 12, patient.nationalityName ??
), patient.nationality ??
patient.nationalityFlagURL != null patient.nationalityId ??
? ClipRRect( '',
borderRadius: BorderRadius.circular(20.0), fontWeight: FontWeight.bold,
child: Image.network( fontSize: 12,
patient.nationalityFlagURL, ),
height: 25, ),
width: 30, ),
errorBuilder: (BuildContext context, patient.nationalityFlagURL != null
Object exception, ? ClipRRect(
StackTrace stackTrace) { borderRadius: BorderRadius.circular(20.0),
return Text('No Image'); child: Image.network(
}, patient.nationalityFlagURL,
)) height: 25,
: SizedBox() width: 30,
], errorBuilder: (BuildContext context,
Object exception,
StackTrace stackTrace) {
return Text('');
},
))
: SizedBox()
],
),
) )
], ],
), ),

Loading…
Cancel
Save