From 59b7220a1f36c9690301ae8834dbcb2cb30c2058 Mon Sep 17 00:00:00 2001 From: haroon amjad Date: Wed, 3 Apr 2024 12:23:07 +0300 Subject: [PATCH] Remarks field added in medical instructions --- ...t_medical_instructions_response_model.dart | 2 +- .../medical_instructions.dart | 111 +++++++++++------- 2 files changed, 71 insertions(+), 42 deletions(-) diff --git a/lib/models/InPatientServices/get_medical_instructions_response_model.dart b/lib/models/InPatientServices/get_medical_instructions_response_model.dart index 2396e588..a3d520fc 100644 --- a/lib/models/InPatientServices/get_medical_instructions_response_model.dart +++ b/lib/models/InPatientServices/get_medical_instructions_response_model.dart @@ -37,7 +37,7 @@ class GetMedicalInstructions { }); } medicalInstructionsXMLField = json['medicalInstructionsXMLField']; - medicalRemarksField = json['medicalRemarksField']; + medicalRemarksField = json['medicalRemarks']; projectIdField = json['projectIdField']; projectNameField = json['projectNameField']; setupIdField = json['setupIdField']; diff --git a/lib/pages/InPatientServices/medical_instructions.dart b/lib/pages/InPatientServices/medical_instructions.dart index 099c5558..d486e6d8 100644 --- a/lib/pages/InPatientServices/medical_instructions.dart +++ b/lib/pages/InPatientServices/medical_instructions.dart @@ -35,14 +35,16 @@ class _MedicalInstructionsPageState extends State { children: [ Padding( padding: const EdgeInsets.all(21.0), - child: Text(TranslationBase.of(context).medicalInstructions, - overflow: TextOverflow.clip, - style: TextStyle( - fontSize: 21.0, - fontWeight: FontWeight.w600, - color: Color(0xff2B353E), - letterSpacing: -0.64, - )), + child: Text( + TranslationBase.of(context).medicalInstructions, + overflow: TextOverflow.clip, + style: TextStyle( + fontSize: 21.0, + fontWeight: FontWeight.w600, + color: Color(0xff2B353E), + letterSpacing: -0.64, + ), + ), ), Expanded( child: Container( @@ -57,39 +59,66 @@ class _MedicalInstructionsPageState extends State { ), child: Padding( padding: EdgeInsets.all(16.0), - child: Container( - child: ListView.separated( - itemCount: widget.getMedicalInstructionsList[0].medicaLInstructionsField.length, - itemBuilder: (BuildContext context, int index) { - return Container( - child: Row( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Container( - child: SvgPicture.asset("assets/images/new-design/ionic-ios-checkmark-circle.svg"), - ), - Container( - width: MediaQuery.of(context).size.width * 0.75, - margin: EdgeInsets.only(left: 5.0, right: 5.0), - child: Text(widget.getMedicalInstructionsList[0].medicaLInstructionsField[index].descriptionField, - overflow: TextOverflow.clip, - style: TextStyle( - fontSize: 14.0, - fontWeight: FontWeight.w600, - color: Color(0xff2B353E), - letterSpacing: -0.64, - )), - ), - ], - )); - }, - separatorBuilder: (BuildContext context, int index) { - return Padding( - padding: const EdgeInsets.only(left: 14, right: 14), - child: mHeight(16.0), - ); - }, - )), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + ListView.separated( + shrinkWrap: true, + itemCount: widget.getMedicalInstructionsList[0].medicaLInstructionsField.length, + itemBuilder: (BuildContext context, int index) { + return Container( + child: Row( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Container( + child: SvgPicture.asset("assets/images/new-design/ionic-ios-checkmark-circle.svg"), + ), + Container( + width: MediaQuery.of(context).size.width * 0.75, + margin: EdgeInsets.only(left: 5.0, right: 5.0), + child: Text(widget.getMedicalInstructionsList[0].medicaLInstructionsField[index].descriptionField, + overflow: TextOverflow.clip, + style: TextStyle( + fontSize: 14.0, + fontWeight: FontWeight.w600, + color: Color(0xff2B353E), + letterSpacing: -0.64, + )), + ), + ], + )); + }, + separatorBuilder: (BuildContext context, int index) { + return Padding( + padding: const EdgeInsets.only(left: 14, right: 14), + child: mHeight(16.0), + ); + }, + ), + mHeight(21), + Text( + TranslationBase.of(context).remarks + ":", + overflow: TextOverflow.clip, + style: TextStyle( + fontSize: 21.0, + fontWeight: FontWeight.w600, + color: Color(0xff2B353E), + letterSpacing: -0.64, + ), + ), + mHeight(12), + Text( + widget.getMedicalInstructionsList[0].medicalRemarksField, + overflow: TextOverflow.clip, + style: TextStyle( + fontSize: 14.0, + fontWeight: FontWeight.w600, + color: Color(0xff2B353E), + letterSpacing: -0.64, + ), + ), + ], + ), ), ), ),