From 726f25b91b43e1bf031a10142665976cc363f138 Mon Sep 17 00:00:00 2001 From: "taha.alam" Date: Thu, 31 Oct 2024 15:55:29 +0300 Subject: [PATCH] WIP:merge issue resolve --- .../patient_profile_screen.dart | 2 +- .../chief_complaint/chief_complaints.dart | 11 ++- .../widgets/complaint_items.dart | 32 ++++++-- .../update_soap_index_vida_plus.dart | 78 +++++++++++-------- 4 files changed, 82 insertions(+), 41 deletions(-) diff --git a/lib/screens/patients/profile/profile_screen/patient_profile_screen.dart b/lib/screens/patients/profile/profile_screen/patient_profile_screen.dart index 588a9b13..7b49ea34 100644 --- a/lib/screens/patients/profile/profile_screen/patient_profile_screen.dart +++ b/lib/screens/patients/profile/profile_screen/patient_profile_screen.dart @@ -302,7 +302,7 @@ class _PatientProfileScreenState extends State with Single }); }else { Navigator.of(context).pushNamed( - UPDATE_EPISODE, arguments: { + UPDATE_EPISODE_VIDA_PLUS, arguments: { 'patient': patient }); } diff --git a/lib/screens/patients/profile/soap_update_vida_plus/subjective/chief_complaint/chief_complaints.dart b/lib/screens/patients/profile/soap_update_vida_plus/subjective/chief_complaint/chief_complaints.dart index c07649a4..0ce7ce7b 100644 --- a/lib/screens/patients/profile/soap_update_vida_plus/subjective/chief_complaint/chief_complaints.dart +++ b/lib/screens/patients/profile/soap_update_vida_plus/subjective/chief_complaint/chief_complaints.dart @@ -1,4 +1,5 @@ import 'package:doctor_app_flutter/screens/patients/profile/soap_update_vida_plus/subjective/chief_complaint/widgets/add_chief_complaint.dart'; +import 'package:doctor_app_flutter/screens/patients/profile/soap_update_vida_plus/subjective/chief_complaint/widgets/complaint_items.dart'; import 'package:doctor_app_flutter/screens/patients/profile/soap_update_vida_plus/subjective/chief_complaint/widgets/empty_complaints.dart'; import 'package:doctor_app_flutter/utils/translations_delegate_base_utils.dart'; import 'package:doctor_app_flutter/widgets/shared/text_fields/app-textfield-custom.dart'; @@ -22,10 +23,12 @@ class UpdateChiefComplaints extends StatelessWidget { if (complaints.isEmpty) ...{ EmptyComplaints() } else ...{ - // ListView.builder( - // itemBuilder: (_, index) => ComplaintItems(complaints[index], onCrossClicked:(){ - // - // })) + ListView.builder( + itemBuilder: (_, index) => ComplaintItems( + complaint: complaints[index], + onCrossClicked: (complaints) { + + })) } ]), ); diff --git a/lib/screens/patients/profile/soap_update_vida_plus/subjective/chief_complaint/widgets/complaint_items.dart b/lib/screens/patients/profile/soap_update_vida_plus/subjective/chief_complaint/widgets/complaint_items.dart index 46f1914f..1719e2cc 100644 --- a/lib/screens/patients/profile/soap_update_vida_plus/subjective/chief_complaint/widgets/complaint_items.dart +++ b/lib/screens/patients/profile/soap_update_vida_plus/subjective/chief_complaint/widgets/complaint_items.dart @@ -1,5 +1,27 @@ -// import 'package:flutter/material.dart'; -// -// class ComplaintItems extends StatelessWidget{ -// -// } \ No newline at end of file +import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart'; +import 'package:flutter/material.dart'; + +class ComplaintItems extends StatelessWidget{ + final String complaint; + final Function(String) onCrossClicked; + + const ComplaintItems({super.key, required this.complaint, required this.onCrossClicked}); + + @override + Widget build(BuildContext context) { + return ListTile( + title: AppText(complaint,fontWeight: FontWeight.w400, fontSize: 14,color: Color(0xFF575757),), + + trailing: IconButton( + onPressed: (){ + onCrossClicked(complaint); + }, + icon: Icon( + Icons.close, + color: Color(0xFFD02127), + ), + ), + ); + } + +} \ No newline at end of file diff --git a/lib/screens/patients/profile/soap_update_vida_plus/update_soap_index_vida_plus.dart b/lib/screens/patients/profile/soap_update_vida_plus/update_soap_index_vida_plus.dart index 0a3b8ba5..d088f8d4 100644 --- a/lib/screens/patients/profile/soap_update_vida_plus/update_soap_index_vida_plus.dart +++ b/lib/screens/patients/profile/soap_update_vida_plus/update_soap_index_vida_plus.dart @@ -14,16 +14,18 @@ import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:hexcolor/hexcolor.dart'; + class UpdateSoapIndexVidaPlus extends StatefulWidget { final bool isUpdate; const UpdateSoapIndexVidaPlus({Key? key, this.isUpdate = false}) : super(key: key); @override - _UpdateSoapIndexState createState() => _UpdateSoapIndexState(); + _UpdateSoapIndexVidaPlusState createState() => _UpdateSoapIndexVidaPlusState(); } -class _UpdateSoapIndexState extends State with TickerProviderStateMixin { +class _UpdateSoapIndexVidaPlusState extends State + with TickerProviderStateMixin { PageController? _controller; int _currentIndex = 0; List myAllergiesList = []; @@ -70,7 +72,9 @@ class _UpdateSoapIndexState extends State with TickerPr crossAxisAlignment: CrossAxisAlignment.start, children: [ Container( - decoration: BoxDecoration(boxShadow: [], color: Theme.of(context).scaffoldBackgroundColor), + decoration: BoxDecoration( + boxShadow: [], + color: Theme.of(context).scaffoldBackgroundColor), child: Column( mainAxisAlignment: MainAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start, @@ -88,8 +92,11 @@ class _UpdateSoapIndexState extends State with TickerPr }, scrollDirection: Axis.horizontal, children: [ - //todo add widgets here - + UpdateSubjectivePage( + changePageViewIndex: changePageViewIndex, + currentIndex: _currentIndex, + patientInfo: patient, + changeLoadingState: changeLoadingState) ], ), ) @@ -101,32 +108,35 @@ class _UpdateSoapIndexState extends State with TickerPr ), bottomSheet: _isLoading ? Container( - height: 0, - ) + height: 0, + ) : Container( - decoration: BoxDecoration( - color: Colors.white, - borderRadius: BorderRadius.all( - Radius.circular(0.0), - ), - border: Border.all(color: HexColor('#707070'), width: 0), - ), - height: SizeConfig.heightMultiplier! * (SizeConfig.isHeightVeryShort ? 12 : 10), - width: double.infinity, - child: Column( - children: [ - SizedBox( - height: 10, - ), - Container( - child: FractionallySizedBox(widthFactor: .80, child: getBottomSheet(model, patient)), - ), - SizedBox( - height: 5, + decoration: BoxDecoration( + color: Colors.white, + borderRadius: BorderRadius.all( + Radius.circular(0.0), + ), + border: Border.all(color: HexColor('#707070'), width: 0), + ), + height: SizeConfig.heightMultiplier! * + (SizeConfig.isHeightVeryShort ? 12 : 10), + width: double.infinity, + child: Column( + children: [ + SizedBox( + height: 10, + ), + Container( + child: FractionallySizedBox( + widthFactor: .80, + child: getBottomSheet(model, patient)), + ), + SizedBox( + height: 5, + ), + ], + ), ), - ], - ), - ), ), ); } @@ -171,7 +181,11 @@ class _UpdateSoapIndexState extends State with TickerPr ), Expanded( child: AppButton( - title: patient.admissionNo != null && patient.admissionNo!.isNotEmpty && !model.isAddExamInProgress ? TranslationBase.of(context).finish : TranslationBase.of(context).next, + title: patient.admissionNo != null && + patient.admissionNo!.isNotEmpty && + !model.isAddExamInProgress + ? TranslationBase.of(context).finish + : TranslationBase.of(context).next, fontWeight: FontWeight.w600, color: Colors.red[700]!, // height: SizeConfig.heightMultiplier! * @@ -246,7 +260,9 @@ class _UpdateSoapIndexState extends State with TickerPr ), Expanded( child: AppButton( - title: model.isAddProgress ? TranslationBase.of(context).next : TranslationBase.of(context).finish, + title: model.isAddProgress + ? TranslationBase.of(context).next + : TranslationBase.of(context).finish, fontWeight: FontWeight.w600, color: Colors.red[700]!, disabled: model.progressNoteText.isEmpty,