Merge branch 'soap-objective-feature-re-design' into 'development'

Soap objective feature re design

See merge request Cloud_Solution/doctor_app_flutter!450
merge-requests/451/merge
Mohammad Aljammal 5 years ago
commit 453fd880fd

@ -14,9 +14,10 @@ class PatientProfileHeaderNewDesign extends StatelessWidget {
final PatiantInformtion patient; final PatiantInformtion patient;
final String patientType; final String patientType;
final String arrivalType; final String arrivalType;
final double height;
PatientProfileHeaderNewDesign( PatientProfileHeaderNewDesign(
this.patient, this.patientType, this.arrivalType); this.patient, this.patientType, this.arrivalType, {this.height = 0.0});
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
@ -36,7 +37,7 @@ class PatientProfileHeaderNewDesign extends StatelessWidget {
decoration: BoxDecoration( decoration: BoxDecoration(
color: Colors.white, color: Colors.white,
), ),
height: 200, height: height == 0 ? 200 : height,
child: Container( child: Container(
padding: EdgeInsets.only(left: 10, right: 10, bottom: 10), padding: EdgeInsets.only(left: 10, right: 10, bottom: 10),
margin: EdgeInsets.only(top: 50), margin: EdgeInsets.only(top: 50),

@ -9,8 +9,9 @@ import 'package:provider/provider.dart';
class StepsWidget extends StatelessWidget { class StepsWidget extends StatelessWidget {
final int index; final int index;
final Function changeCurrentTab; final Function changeCurrentTab;
final double height;
StepsWidget({Key key, this.index, this.changeCurrentTab}); StepsWidget({Key key, this.index, this.changeCurrentTab, this.height = 0.0});
// TODO : Add translation to name // TODO : Add translation to name
@override @override
@ -20,7 +21,7 @@ class StepsWidget extends StatelessWidget {
? Stack( ? Stack(
children: [ children: [
Container( Container(
height: 150, height: height == 0 ? 150 : height,
width: MediaQuery.of(context).size.width, width: MediaQuery.of(context).size.width,
color: Colors.transparent, color: Colors.transparent,
child: Center( child: Center(
@ -243,7 +244,7 @@ class StepsWidget extends StatelessWidget {
: Stack( : Stack(
children: [ children: [
Container( Container(
height: 150, height: height == 0 ? 150 : height,
width: MediaQuery width: MediaQuery
.of(context) .of(context)
.size .size

@ -35,7 +35,9 @@ class _UpdateSoapIndexState extends State<UpdateSoapIndex>
List<MySelectedExamination> mySelectedExamination = List(); List<MySelectedExamination> mySelectedExamination = List();
List<MySelectedAssessment> mySelectedAssessment = List(); List<MySelectedAssessment> mySelectedAssessment = List();
GetPatientProgressNoteResModel patientProgressNote = GetPatientProgressNoteResModel(); GetPatientProgressNoteResModel patientProgressNote =
GetPatientProgressNoteResModel();
changePageViewIndex(pageIndex) { changePageViewIndex(pageIndex) {
if (pageIndex != _currentIndex) changeLoadingState(true); if (pageIndex != _currentIndex) changeLoadingState(true);
_controller.jumpToPage(pageIndex); _controller.jumpToPage(pageIndex);
@ -67,96 +69,76 @@ class _UpdateSoapIndexState extends State<UpdateSoapIndex>
isLoading: _isLoading, isLoading: _isLoading,
isShowAppBar: false, isShowAppBar: false,
// appBarTitle: TranslationBase.of(context).healthRecordInformation, // appBarTitle: TranslationBase.of(context).healthRecordInformation,
body: SingleChildScrollView( // TODO mousa removed the singleChildScrollView
child: Column( body: Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
Container( Container(
decoration: BoxDecoration( decoration: BoxDecoration(
boxShadow: <BoxShadow>[], boxShadow: <BoxShadow>[],
color: Theme.of(context).scaffoldBackgroundColor), color: Theme.of(context).scaffoldBackgroundColor),
child: Column( child: Column(
mainAxisAlignment: MainAxisAlignment.start, mainAxisAlignment: MainAxisAlignment.start,
children: <Widget>[ children: <Widget>[
// PatientPageHeaderWidget(patient), // PatientPageHeaderWidget(patient),
PatientProfileHeaderNewDesign(patient, '7', '7'), PatientProfileHeaderNewDesign(patient, '7', '7', height: MediaQuery.of(context).size.height * 0.28,),
Container( Container(
width: double.infinity, width: double.infinity,
height: 1, height: 1,
color: Color(0xffCCCCCC), color: Color(0xffCCCCCC),
),
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: MediaQuery.of(context).size.height * 0.21,
), ),
FractionallySizedBox( ),
child: SingleChildScrollView( Container(
child: 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.75, child: PageView(
child: Column( physics: NeverScrollableScrollPhysics(),
children: [ controller: _controller,
Container( onPageChanged: (index) {
margin: EdgeInsets.only( setState(() {
left: MediaQuery.of(context).size.width * _currentIndex = index;
0.05, });
right: MediaQuery.of(context).size.width * },
0.05), scrollDirection: Axis.horizontal,
child: StepsWidget( children: <Widget>[
index: _currentIndex, UpdateSubjectivePage(
changeCurrentTab: changePageViewIndex, changePageViewIndex: changePageViewIndex,
), myAllergiesList: myAllergiesList,
), myHistoryList: myHistoryList,
Expanded( patientInfo: patient,
child: PageView( changeLoadingState: changeLoadingState),
UpdateObjectivePage(
physics: NeverScrollableScrollPhysics(), changePageViewIndex: changePageViewIndex,
controller: _controller, mySelectedExamination: mySelectedExamination,
onPageChanged: (index) { patientInfo: patient,
setState(() { changeLoadingState: changeLoadingState),
_currentIndex = index; UpdateAssessmentPage(
}); changePageViewIndex: changePageViewIndex,
}, mySelectedAssessmentList: mySelectedAssessment,
scrollDirection: Axis.horizontal, patientInfo: patient,
children: <Widget>[ changeLoadingState: changeLoadingState),
UpdateSubjectivePage( UpdatePlanPage(
changePageViewIndex: changePageViewIndex, changePageViewIndex: changePageViewIndex,
myAllergiesList: myAllergiesList, patientInfo: patient,
myHistoryList: myHistoryList, patientProgressNote: patientProgressNote,
patientInfo: patient, changeLoadingState: changeLoadingState)
changeLoadingState: changeLoadingState ],
), ),
UpdateObjectivePage( )
changePageViewIndex: changePageViewIndex, ],
mySelectedExamination:
mySelectedExamination,
patientInfo: patient,
changeLoadingState: changeLoadingState
),
UpdateAssessmentPage(
changePageViewIndex: changePageViewIndex,
mySelectedAssessmentList:
mySelectedAssessment,
patientInfo: patient,
changeLoadingState: changeLoadingState
),
UpdatePlanPage(
changePageViewIndex: changePageViewIndex,
patientInfo: patient,
patientProgressNote: patientProgressNote,
changeLoadingState: changeLoadingState
)
],
),
),
],
),
),
),
)
],
),
), ),
], ),
), ],
), ),
), ),
); );

Loading…
Cancel
Save