diff --git a/lib/widgets/patients/profile/SOAP/assessment_page.dart b/lib/widgets/patients/profile/SOAP/assessment_page.dart index 3bd9f0f1..5eb3694b 100644 --- a/lib/widgets/patients/profile/SOAP/assessment_page.dart +++ b/lib/widgets/patients/profile/SOAP/assessment_page.dart @@ -236,7 +236,7 @@ class _AssessmentPageState extends State { height: 6, ), AppText( - "Some short remark about the allergy", + widget.mySelectedAssessment.remark, fontSize: 10, color: Colors.grey, ), @@ -268,7 +268,9 @@ class _AssessmentPageState extends State { Column( children: [ InkWell( - onTap: () {}, + onTap: () { + openAssessmentDialog(context); + }, child: Icon(EvaIcons .edit2Outline), ) @@ -334,14 +336,15 @@ class AddAssessmentDetails extends StatefulWidget { } class _AddAssessmentDetailsState extends State { - MasterKeyModel _selectedDiagnosisCondition; - MasterKeyModel _selectedDiagnosisType; + // MasterKeyModel _selectedDiagnosisCondition; + // MasterKeyModel _selectedDiagnosisType; TextEditingController remarkController = TextEditingController(); TextEditingController appointmentIdController = TextEditingController( text: "234567"); @override Widget build(BuildContext context) { + remarkController.text = widget.mySelectedAssessment.remark??""; final screenSize = MediaQuery .of(context) .size; @@ -433,14 +436,14 @@ class _AddAssessmentDetailsState extends State { ? () { MasterKeyDailog dialog = MasterKeyDailog( list: model.listOfDiagnosisCondition, + selectedValue: widget.mySelectedAssessment + .selectedDiagnosisCondition, okText: TranslationBase .of(context) .ok, okFunction: ( MasterKeyModel selectedValue) { setState(() { - _selectedDiagnosisCondition = - selectedValue; widget.mySelectedAssessment .selectedDiagnosisCondition = selectedValue; @@ -459,8 +462,10 @@ class _AddAssessmentDetailsState extends State { child: TextField( decoration: textFieldSelectorDecoration( "Condition", - _selectedDiagnosisCondition != null - ? _selectedDiagnosisCondition + widget.mySelectedAssessment + .selectedDiagnosisCondition != null + ? widget.mySelectedAssessment + .selectedDiagnosisCondition .nameEn : null, true), @@ -485,7 +490,8 @@ class _AddAssessmentDetailsState extends State { okFunction: ( MasterKeyModel selectedValue) { setState(() { - _selectedDiagnosisCondition = + widget.mySelectedAssessment + .selectedDiagnosisCondition = selectedValue; }); }, @@ -502,8 +508,10 @@ class _AddAssessmentDetailsState extends State { child: TextField( decoration: textFieldSelectorDecoration( "Condition", - _selectedDiagnosisCondition != null - ? _selectedDiagnosisCondition + widget.mySelectedAssessment + .selectedDiagnosisCondition != null + ? widget.mySelectedAssessment + .selectedDiagnosisCondition .nameEn : null, true), @@ -527,11 +535,11 @@ class _AddAssessmentDetailsState extends State { okFunction: ( MasterKeyModel selectedValue) { setState(() { - _selectedDiagnosisType = - selectedValue; + // _selectedDiagnosisType = + // selectedValue; widget.mySelectedAssessment .selectedDiagnosisType = - _selectedDiagnosisType; + selectedValue; }); }, ); @@ -547,8 +555,10 @@ class _AddAssessmentDetailsState extends State { child: TextField( decoration: textFieldSelectorDecoration( "Type", - _selectedDiagnosisType != null - ? _selectedDiagnosisType.nameEn + widget.mySelectedAssessment + .selectedDiagnosisType != null + ? widget.mySelectedAssessment + .selectedDiagnosisType.nameEn : null, true), enabled: false, diff --git a/lib/widgets/patients/profile/SOAP/steps_widget.dart b/lib/widgets/patients/profile/SOAP/steps_widget.dart index 863da3a9..b0b091c1 100644 --- a/lib/widgets/patients/profile/SOAP/steps_widget.dart +++ b/lib/widgets/patients/profile/SOAP/steps_widget.dart @@ -1,5 +1,6 @@ import 'package:doctor_app_flutter/core/viewModel/project_view_model.dart'; import 'package:doctor_app_flutter/widgets/shared/Text.dart'; +import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:provider/provider.dart'; @@ -70,10 +71,11 @@ class StepsWidget extends StatelessWidget { SizedBox( height: index == 0 ? 5 : 10, ), - Texts('SUBJECTIVE', - variant: "bodyText", - bold: true, - color: Colors.black), + AppText( + "SUBJECTIVE", + fontWeight: FontWeight.bold, + fontSize: 14, + ), ], ), ), @@ -82,7 +84,7 @@ class StepsWidget extends StatelessWidget { top: index == 1 ? 15 : 30, left: MediaQuery.of(context).size.width * 0.28, child: InkWell( - onTap: () => index >= 2 ? changeCurrentTab(1) : null, + onTap: () => index >= 1 ? changeCurrentTab(1) : null, child: Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ @@ -119,10 +121,11 @@ class StepsWidget extends StatelessWidget { SizedBox( height: index == 1 ? 5 : 10, ), - Texts('OBJECTIVE', - variant: "bodyText", - bold: true, - color: Colors.black), + AppText( + "OBJECTIVE", + fontWeight: FontWeight.bold, + fontSize: 14, + ), ], ), ), @@ -131,7 +134,10 @@ class StepsWidget extends StatelessWidget { top: index == 2 ? 15 : 30, left: MediaQuery.of(context).size.width * 0.52, child: InkWell( - onTap: () => index >= 2 ? changeCurrentTab(3) : null, + onTap: () { + if(index >= 3) + changeCurrentTab(2); + }, child: Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ @@ -168,10 +174,11 @@ class StepsWidget extends StatelessWidget { SizedBox( height: index == 2 ? 5 : 10, ), - Texts('ASSESSMENT', - variant: "bodyText", - bold: true, - color: Colors.black), + AppText( + "ASSESSMENT", + fontWeight: FontWeight.bold, + fontSize: 14, + ), ], ), ), @@ -212,15 +219,17 @@ class StepsWidget extends StatelessWidget { ? Colors.white : Colors.grey, ), - ), + ) ), SizedBox( height: index == 3 ? 5 : 10, ), - Texts('PLAN', - variant: "bodyText", - bold: true, - color: Colors.black), + AppText( + "PLAN", + fontWeight: FontWeight.bold, + textAlign: TextAlign.center, + fontSize: 14, + ), ], ), ), @@ -274,18 +283,19 @@ class StepsWidget extends StatelessWidget { color: index == 0 ? Colors.black : index > 0 - ? Colors.white - : Colors.grey, + ? Colors.white + : Colors.grey, ), ), ), SizedBox( height: index == 0 ? 5 : 10, ), - Texts('SUBJECTIVE', - variant: "bodyText", - bold: true, - color: Colors.black), + AppText( + "SUBJECTIVE", + fontWeight: FontWeight.bold, + fontSize: 16, + ), ], ), ), @@ -331,10 +341,11 @@ class StepsWidget extends StatelessWidget { SizedBox( height: index == 1 ? 5 : 10, ), - Texts('OBJECTIVE', - variant: "bodyText", - bold: true, - color: Colors.black), + AppText( + "OBJECTIVE", + fontWeight: FontWeight.bold, + fontSize: 14, + ), ], ), ), @@ -343,7 +354,7 @@ class StepsWidget extends StatelessWidget { top: index == 2 ? 15 : 30, right: MediaQuery.of(context).size.width * 0.52, child: InkWell( - onTap: () => index >= 2 ? changeCurrentTab(3) : null, + onTap: () => index >= 3 ? changeCurrentTab(2) : null, child: Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ @@ -383,10 +394,11 @@ class StepsWidget extends StatelessWidget { Padding( padding: const EdgeInsets.only(right: 2), - child: Texts('ASSESSMENT', - variant: "bodyText", - bold: true, - color: Colors.black), + child: AppText( + "ASSESSMENT", + fontWeight: FontWeight.bold, + fontSize: 14, + ), ), ], ), @@ -433,10 +445,11 @@ class StepsWidget extends StatelessWidget { SizedBox( height: index == 3 ? 5 : 10, ), - Texts('PLAN', - variant: "bodyText", - bold: true, - color: Colors.black), + AppText( + "PLAN", + fontWeight: FontWeight.bold, + fontSize: 14, + ), ], ), ), diff --git a/lib/widgets/shared/dialogs/master_key_dailog.dart b/lib/widgets/shared/dialogs/master_key_dailog.dart index a276c4af..42d766e7 100644 --- a/lib/widgets/shared/dialogs/master_key_dailog.dart +++ b/lib/widgets/shared/dialogs/master_key_dailog.dart @@ -2,16 +2,17 @@ import 'package:doctor_app_flutter/models/SOAP/master_key_model.dart'; import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; import 'package:flutter/material.dart'; +// ignore: must_be_immutable class MasterKeyDailog extends StatefulWidget { final List list; final okText; final Function(MasterKeyModel) okFunction; - MasterKeyModel selectedValue; + MasterKeyModel selectedValue; MasterKeyDailog( {@required this.list, @required this.okText, - @required this.okFunction}); + @required this.okFunction, this.selectedValue}); @override _MasterKeyDailogState createState() => _MasterKeyDailogState();