add stepper in all soap steps

merge-requests/473/head
Elham Rababah 5 years ago
parent ff157b417e
commit e9d04527a6

@ -0,0 +1,45 @@
import 'package:doctor_app_flutter/config/size_config.dart';
import 'package:doctor_app_flutter/util/translations_delegate_base.dart';
import 'package:doctor_app_flutter/widgets/patients/profile/soap_update/steps_widget.dart';
import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart';
import 'package:flutter/material.dart';
class SOAPStepHeader extends StatelessWidget {
const SOAPStepHeader({
Key key,
this.currentIndex, this.changePageViewIndex,
}) : super(key: key);
final int currentIndex;
final Function changePageViewIndex;
@override
Widget build(BuildContext context) {
return Column(
mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
AppText(
TranslationBase.of(context).createNew,
fontSize: 3 * SizeConfig.textMultiplier,
fontWeight: FontWeight.w500,
),
AppText(TranslationBase.of(context).episode,
fontSize: 3.5 * SizeConfig.textMultiplier,
fontWeight: FontWeight.bold,
),
Container(
color: Theme.of(context).scaffoldBackgroundColor,
child: StepsWidget(
index: currentIndex,
changeCurrentTab: changePageViewIndex,
height: 100,//MediaQuery.of(context).size.height * 0.17,
),
),
SizedBox(
height: 30,
),
],
);
}
}

@ -26,13 +26,14 @@ import 'package:font_awesome_flutter/font_awesome_flutter.dart';
import 'package:hexcolor/hexcolor.dart'; import 'package:hexcolor/hexcolor.dart';
import 'package:provider/provider.dart'; import 'package:provider/provider.dart';
import '../SOAP_step_header.dart';
import 'examination-item-card.dart'; import 'examination-item-card.dart';
import 'objective-add-examination-page.dart'; import 'objective-add-examination-page.dart';
class UpdateObjectivePage extends StatefulWidget { class UpdateObjectivePage extends StatefulWidget {
final Function changePageViewIndex; final Function changePageViewIndex;
final Function changeLoadingState; final Function changeLoadingState;
final int currentIndex;
final List<MySelectedExamination> mySelectedExamination; final List<MySelectedExamination> mySelectedExamination;
final PatiantInformtion patientInfo; final PatiantInformtion patientInfo;
@ -41,7 +42,7 @@ class UpdateObjectivePage extends StatefulWidget {
this.changePageViewIndex, this.changePageViewIndex,
this.mySelectedExamination, this.mySelectedExamination,
this.patientInfo, this.patientInfo,
this.changeLoadingState}); this.changeLoadingState, this.currentIndex});
@override @override
_UpdateObjectivePageState createState() => _UpdateObjectivePageState(); _UpdateObjectivePageState createState() => _UpdateObjectivePageState();
@ -108,6 +109,8 @@ class _UpdateObjectivePageState extends State<UpdateObjectivePage> {
body: Column( body: Column(
mainAxisAlignment: MainAxisAlignment.spaceBetween, mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [ children: [
SOAPStepHeader(currentIndex: widget.currentIndex, changePageViewIndex:widget.changePageViewIndex),
Expanded( Expanded(
child: SingleChildScrollView( child: SingleChildScrollView(
physics: ScrollPhysics(), physics: ScrollPhysics(),

@ -1,5 +1,6 @@
import 'package:doctor_app_flutter/client/base_app_client.dart'; import 'package:doctor_app_flutter/client/base_app_client.dart';
import 'package:doctor_app_flutter/config/shared_pref_kay.dart'; import 'package:doctor_app_flutter/config/shared_pref_kay.dart';
import 'package:doctor_app_flutter/config/size_config.dart';
import 'package:doctor_app_flutter/core/enum/master_lookup_key.dart'; import 'package:doctor_app_flutter/core/enum/master_lookup_key.dart';
import 'package:doctor_app_flutter/core/enum/viewstate.dart'; import 'package:doctor_app_flutter/core/enum/viewstate.dart';
import 'package:doctor_app_flutter/core/viewModel/SOAP_view_model.dart'; import 'package:doctor_app_flutter/core/viewModel/SOAP_view_model.dart';
@ -21,10 +22,13 @@ import 'package:doctor_app_flutter/widgets/patients/profile/soap_update/subjecti
import 'package:doctor_app_flutter/widgets/patients/profile/soap_update/subjective/update_history_widget.dart'; import 'package:doctor_app_flutter/widgets/patients/profile/soap_update/subjective/update_history_widget.dart';
import 'package:doctor_app_flutter/widgets/shared/app_buttons_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/app_buttons_widget.dart';
import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart';
import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:hexcolor/hexcolor.dart'; import 'package:hexcolor/hexcolor.dart';
import '../SOAP_step_header.dart';
import '../expandable_SOAP_widget.dart'; import '../expandable_SOAP_widget.dart';
import '../steps_widget.dart';
class UpdateSubjectivePage extends StatefulWidget { class UpdateSubjectivePage extends StatefulWidget {
final Function changePageViewIndex; final Function changePageViewIndex;
@ -32,13 +36,14 @@ class UpdateSubjectivePage extends StatefulWidget {
final List<MySelectedAllergy> myAllergiesList; final List<MySelectedAllergy> myAllergiesList;
final List<MySelectedHistory> myHistoryList; final List<MySelectedHistory> myHistoryList;
final PatiantInformtion patientInfo; final PatiantInformtion patientInfo;
final int currentIndex;
UpdateSubjectivePage( UpdateSubjectivePage(
{Key key, {Key key,
this.changePageViewIndex, this.changePageViewIndex,
this.myAllergiesList, this.myAllergiesList,
this.myHistoryList, this.myHistoryList,
this.patientInfo, this.changeLoadingState}); this.patientInfo, this.changeLoadingState, this.currentIndex});
@override @override
_UpdateSubjectivePageState createState() => _UpdateSubjectivePageState(); _UpdateSubjectivePageState createState() => _UpdateSubjectivePageState();
@ -231,10 +236,10 @@ class _UpdateSubjectivePageState extends State<UpdateSubjectivePage> {
widthFactor: 0.9, widthFactor: 0.9,
child: Column( child: Column(
mainAxisAlignment: MainAxisAlignment.start, mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
SizedBox(
height: 30, SOAPStepHeader(currentIndex: widget.currentIndex, changePageViewIndex:widget.changePageViewIndex),
),
ExpandableSOAPWidget( ExpandableSOAPWidget(
headerTitle: TranslationBase.of(context) headerTitle: TranslationBase.of(context)
.chiefComplaints .chiefComplaints
@ -535,3 +540,4 @@ class _UpdateSubjectivePageState extends State<UpdateSubjectivePage> {

@ -14,6 +14,7 @@ import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart';
import 'package:doctor_app_flutter/screens/base/base_view.dart'; import 'package:doctor_app_flutter/screens/base/base_view.dart';
import 'package:doctor_app_flutter/util/helpers.dart'; import 'package:doctor_app_flutter/util/helpers.dart';
import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; import 'package:doctor_app_flutter/util/translations_delegate_base.dart';
import 'package:doctor_app_flutter/widgets/patients/profile/soap_update/subjective/update_subjective_page.dart';
import 'package:doctor_app_flutter/widgets/shared/Text.dart'; import 'package:doctor_app_flutter/widgets/shared/Text.dart';
import 'package:doctor_app_flutter/widgets/shared/TextFields.dart'; import 'package:doctor_app_flutter/widgets/shared/TextFields.dart';
import 'package:doctor_app_flutter/widgets/shared/app-textfield-custom.dart'; import 'package:doctor_app_flutter/widgets/shared/app-textfield-custom.dart';
@ -28,6 +29,7 @@ import 'package:flutter/material.dart';
import 'package:font_awesome_flutter/font_awesome_flutter.dart'; import 'package:font_awesome_flutter/font_awesome_flutter.dart';
import 'package:provider/provider.dart'; import 'package:provider/provider.dart';
import 'SOAP_step_header.dart';
import 'custom_validation_error.dart'; import 'custom_validation_error.dart';
class UpdateAssessmentPage extends StatefulWidget { class UpdateAssessmentPage extends StatefulWidget {
@ -35,13 +37,13 @@ class UpdateAssessmentPage extends StatefulWidget {
List<MySelectedAssessment> mySelectedAssessmentList; List<MySelectedAssessment> mySelectedAssessmentList;
final PatiantInformtion patientInfo; final PatiantInformtion patientInfo;
final Function changeLoadingState; final Function changeLoadingState;
final int currentIndex;
UpdateAssessmentPage( UpdateAssessmentPage(
{Key key, {Key key,
this.changePageViewIndex, this.changePageViewIndex,
this.mySelectedAssessmentList, this.mySelectedAssessmentList,
this.patientInfo, this.patientInfo,
this.changeLoadingState}); this.changeLoadingState, this.currentIndex});
@override @override
_UpdateAssessmentPageState createState() => _UpdateAssessmentPageState(); _UpdateAssessmentPageState createState() => _UpdateAssessmentPageState();
@ -122,9 +124,7 @@ class _UpdateAssessmentPageState extends State<UpdateAssessmentPage> {
child: Column( child: Column(
mainAxisAlignment: MainAxisAlignment.start, mainAxisAlignment: MainAxisAlignment.start,
children: [ children: [
SizedBox( SOAPStepHeader(currentIndex: widget.currentIndex, changePageViewIndex:widget.changePageViewIndex),
height: 30,
),
Container( Container(
width: double.infinity, width: double.infinity,
margin: EdgeInsets.only(top: 10, left: 10, right: 10), margin: EdgeInsets.only(top: 10, left: 10, right: 10),
@ -689,6 +689,7 @@ class _AddAssessmentDetailsState extends State<AddAssessmentDetails> {
child: Column( child: Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
SizedBox( SizedBox(
height: 16, height: 16,
), ),

@ -1,6 +1,4 @@
import 'package:doctor_app_flutter/config/config.dart';
import 'package:doctor_app_flutter/config/shared_pref_kay.dart'; import 'package:doctor_app_flutter/config/shared_pref_kay.dart';
import 'package:doctor_app_flutter/config/size_config.dart';
import 'package:doctor_app_flutter/core/enum/viewstate.dart'; import 'package:doctor_app_flutter/core/enum/viewstate.dart';
import 'package:doctor_app_flutter/core/viewModel/SOAP_view_model.dart'; import 'package:doctor_app_flutter/core/viewModel/SOAP_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';
@ -13,23 +11,24 @@ import 'package:doctor_app_flutter/screens/base/base_view.dart';
import 'package:doctor_app_flutter/util/date-utils.dart'; import 'package:doctor_app_flutter/util/date-utils.dart';
import 'package:doctor_app_flutter/util/helpers.dart'; import 'package:doctor_app_flutter/util/helpers.dart';
import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; import 'package:doctor_app_flutter/util/translations_delegate_base.dart';
import 'package:doctor_app_flutter/widgets/patients/profile/soap_update/subjective/update_subjective_page.dart';
import 'package:doctor_app_flutter/widgets/shared/Text.dart'; import 'package:doctor_app_flutter/widgets/shared/Text.dart';
import 'package:doctor_app_flutter/widgets/shared/TextFields.dart';
import 'package:doctor_app_flutter/widgets/shared/app-textfield-custom.dart'; import 'package:doctor_app_flutter/widgets/shared/app-textfield-custom.dart';
import 'package:doctor_app_flutter/widgets/shared/app_buttons_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/app_buttons_widget.dart';
import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart';
import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart';
import 'package:doctor_app_flutter/widgets/shared/divider_with_spaces_around.dart';
import 'package:doctor_app_flutter/widgets/shared/expandable-widget-header-body.dart'; import 'package:doctor_app_flutter/widgets/shared/expandable-widget-header-body.dart';
import 'package:doctor_app_flutter/widgets/shared/new_text_Field.dart';
import 'package:eva_icons_flutter/eva_icons_flutter.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:font_awesome_flutter/font_awesome_flutter.dart'; import 'package:font_awesome_flutter/font_awesome_flutter.dart';
import 'SOAP_step_header.dart';
class UpdatePlanPage extends StatefulWidget { class UpdatePlanPage extends StatefulWidget {
final Function changePageViewIndex; final Function changePageViewIndex;
final PatiantInformtion patientInfo; final PatiantInformtion patientInfo;
final Function changeLoadingState; final Function changeLoadingState;
final int currentIndex;
GetPatientProgressNoteResModel patientProgressNote; GetPatientProgressNoteResModel patientProgressNote;
UpdatePlanPage( UpdatePlanPage(
@ -37,7 +36,8 @@ class UpdatePlanPage extends StatefulWidget {
this.changePageViewIndex, this.changePageViewIndex,
this.patientInfo, this.patientInfo,
this.changeLoadingState, this.changeLoadingState,
this.patientProgressNote}); this.patientProgressNote,
this.currentIndex});
@override @override
_UpdatePlanPageState createState() => _UpdatePlanPageState(); _UpdatePlanPageState createState() => _UpdatePlanPageState();
@ -96,7 +96,12 @@ class _UpdatePlanPageState extends State<UpdatePlanPage> {
child: Center( child: Center(
child: FractionallySizedBox( child: FractionallySizedBox(
widthFactor: 0.95, widthFactor: 0.95,
child: Container( child: Column(
children: [
SOAPStepHeader(currentIndex: widget.currentIndex, changePageViewIndex:widget.changePageViewIndex),
SizedBox(height: 10,),
Container(
margin: EdgeInsets.all(8.0), margin: EdgeInsets.all(8.0),
padding: EdgeInsets.all(12.0), padding: EdgeInsets.all(12.0),
decoration: BoxDecoration( decoration: BoxDecoration(
@ -111,6 +116,7 @@ class _UpdatePlanPageState extends State<UpdatePlanPage> {
child: Column( child: Column(
mainAxisAlignment: MainAxisAlignment.start, mainAxisAlignment: MainAxisAlignment.start,
children: [ children: [
SizedBox( SizedBox(
height: 10, height: 10,
), ),
@ -276,6 +282,8 @@ class _UpdatePlanPageState extends State<UpdatePlanPage> {
], ],
), ),
), ),
],
),
), ),
), ),
), ),

@ -91,41 +91,10 @@ class _UpdateSoapIndexState extends State<UpdateSoapIndex>
height: 1, height: 1,
color: Color(0xffCCCCCC), color: Color(0xffCCCCCC),
), ),
Container(
margin: EdgeInsets.only(
top: 10,
left: MediaQuery.of(context).size.width * 0.05,
right: MediaQuery.of(context).size.width * 0.05),
child: AppText(
TranslationBase.of(context).createNew,
fontSize: 3 * SizeConfig.textMultiplier,
fontWeight: FontWeight.w500,
),
),
Container(
margin: EdgeInsets.only(
left: MediaQuery.of(context).size.width * 0.05,
right: MediaQuery.of(context).size.width * 0.05),
child: AppText(TranslationBase.of(context).episode,
fontSize: 3.5 * SizeConfig.textMultiplier,
fontWeight: FontWeight.bold,
),
),
Container(
color: Theme.of(context).scaffoldBackgroundColor,
margin: EdgeInsets.only(
left: MediaQuery.of(context).size.width * 0.05,
right: MediaQuery.of(context).size.width * 0.05),
child: StepsWidget(
index: _currentIndex,
changeCurrentTab: changePageViewIndex,
height: 100,//MediaQuery.of(context).size.height * 0.17,
),
),
Container( Container(
color: Theme.of(context).scaffoldBackgroundColor, color: Theme.of(context).scaffoldBackgroundColor,
height: MediaQuery.of(context).size.height * 0.50, height: MediaQuery.of(context).size.height * 0.73,
child: PageView( child: PageView(
physics: NeverScrollableScrollPhysics(), physics: NeverScrollableScrollPhysics(),
controller: _controller, controller: _controller,
@ -138,22 +107,26 @@ class _UpdateSoapIndexState extends State<UpdateSoapIndex>
children: <Widget>[ children: <Widget>[
UpdateSubjectivePage( UpdateSubjectivePage(
changePageViewIndex: changePageViewIndex, changePageViewIndex: changePageViewIndex,
currentIndex: _currentIndex,
myAllergiesList: myAllergiesList, myAllergiesList: myAllergiesList,
myHistoryList: myHistoryList, myHistoryList: myHistoryList,
patientInfo: patient, patientInfo: patient,
changeLoadingState: changeLoadingState), changeLoadingState: changeLoadingState),
UpdateObjectivePage( UpdateObjectivePage(
changePageViewIndex: changePageViewIndex, changePageViewIndex: changePageViewIndex,
currentIndex: _currentIndex,
mySelectedExamination: mySelectedExamination, mySelectedExamination: mySelectedExamination,
patientInfo: patient, patientInfo: patient,
changeLoadingState: changeLoadingState), changeLoadingState: changeLoadingState),
UpdateAssessmentPage( UpdateAssessmentPage(
changePageViewIndex: changePageViewIndex, changePageViewIndex: changePageViewIndex,
currentIndex: _currentIndex,
mySelectedAssessmentList: mySelectedAssessment, mySelectedAssessmentList: mySelectedAssessment,
patientInfo: patient, patientInfo: patient,
changeLoadingState: changeLoadingState), changeLoadingState: changeLoadingState),
UpdatePlanPage( UpdatePlanPage(
changePageViewIndex: changePageViewIndex, changePageViewIndex: changePageViewIndex,
currentIndex: _currentIndex,
patientInfo: patient, patientInfo: patient,
patientProgressNote: patientProgressNote, patientProgressNote: patientProgressNote,
changeLoadingState: changeLoadingState) changeLoadingState: changeLoadingState)

Loading…
Cancel
Save