diff --git a/lib/screens/patients/patients_referred_screen.dart b/lib/screens/patients/patients_referred_screen.dart index 70a84f03..df1427c2 100644 --- a/lib/screens/patients/patients_referred_screen.dart +++ b/lib/screens/patients/patients_referred_screen.dart @@ -46,6 +46,7 @@ class _PatientReferredScreenState extends State { Listlist=List(); return AppScaffold( + //TODO : add Translation appBarTitle: "My Referred Patients",//patientTypetitle, body: Center( diff --git a/lib/widgets/patients/profile/SOAP/objective_page.dart b/lib/widgets/patients/profile/SOAP/objective_page.dart index 8960a8dc..c0df7241 100644 --- a/lib/widgets/patients/profile/SOAP/objective_page.dart +++ b/lib/widgets/patients/profile/SOAP/objective_page.dart @@ -1,18 +1,47 @@ +import 'package:doctor_app_flutter/config/config.dart'; import 'package:doctor_app_flutter/util/translations_delegate_base.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_buttons_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/divider_with_spaces_around.dart'; +import 'package:doctor_app_flutter/widgets/shared/expandable-widget-header-body.dart'; +import 'package:eva_icons_flutter/eva_icons_flutter.dart'; import 'package:flutter/material.dart'; +import 'package:font_awesome_flutter/font_awesome_flutter.dart'; +import 'package:hexcolor/hexcolor.dart'; -class ObjectivePage extends StatelessWidget { +class ObjectivePage extends StatefulWidget { final Function changePageViewIndex; ObjectivePage({Key key, this.changePageViewIndex}); + @override + _ObjectivePageState createState() => _ObjectivePageState(); +} + +class _ObjectivePageState extends State { + bool isSysExaminationExpand = false; + List ExaminationsList; + BoxDecoration containerBorderDecoration( + Color containerColor, Color borderColor) { + return BoxDecoration( + color: containerColor, + shape: BoxShape.rectangle, + borderRadius: BorderRadius.all(Radius.circular(6)), + border: Border.fromBorderSide(BorderSide( + color: borderColor, + width: 0.5, + )), + ); + } @override Widget build(BuildContext context) { + final screenSize = MediaQuery.of(context).size; + return AppScaffold( isShowAppBar: false, -// baseViewModel: widget.model, body: SingleChildScrollView( physics: ScrollPhysics(), child: Center( @@ -21,11 +50,173 @@ class ObjectivePage extends StatelessWidget { child: Column( mainAxisAlignment: MainAxisAlignment.start, children: [ + SizedBox( + height: 30, + ), + HeaderBodyExpandableNotifier( + headerWidget: Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + Row( + children: [ + Texts('Physical/System Examination', + variant: + isSysExaminationExpand ? "bodyText" : '', + bold: isSysExaminationExpand ? true : false, + color: Colors.black), + Icon( + FontAwesomeIcons.asterisk, + color: AppGlobal.appPrimaryColor, + size: 12, + ) + ], + ), + InkWell( + onTap: () { + setState(() { + isSysExaminationExpand = + !isSysExaminationExpand; + }); + }, + child: Icon(isSysExaminationExpand + ? EvaIcons.minus + : EvaIcons.plus)) + ], + ), + bodyWidget: Column(children: [ + SizedBox( + height: 20, + ), + Column( + children: [ + Container( + margin: + EdgeInsets.only(left: 10, right: 10, top: 15), + child: TextFields( + hintText: "Add Examination", + fontSize: 13.5, + onTapTextFields: () { + openExaminationList(context); + }, + readOnly: true, + // hintColor: Colors.black, + suffixIcon: EvaIcons.plusCircleOutline, + suffixIconColor: AppGlobal.appPrimaryColor, + fontWeight: FontWeight.w600, + // controller: messageController, + validator: (value) { + if (value == null) + return TranslationBase.of(context) + .emptyMessage; + else + return null; + }), + ), + SizedBox( + height: 20, + ), + Container( + margin: + EdgeInsets.only(left: 15, right: 15, top: 15), + child: Column( + children: [ + Row( + mainAxisAlignment: + MainAxisAlignment.spaceBetween, + children: [ + Texts('Abdomen'.toUpperCase(), + variant: "bodyText", + bold: true, + color: Colors.black) + ], + ), + SizedBox( + height: 8, + ), + Row( + mainAxisAlignment: + MainAxisAlignment.spaceBetween, + children: [ + Row( + children: [ + InkWell( + child: Center( + child: Container( + height: screenSize.height * 0.070, + decoration: containerBorderDecoration( + Colors.white,Colors.grey + ), + child: Center( + child: Padding( + padding: const EdgeInsets.all(8.0), + child: Text( + "Normal", + style: TextStyle( + fontSize: 12, + color: + Colors.black, //Colors.black, + fontWeight: FontWeight.bold, + ), + ), + ), + )), + ), + onTap: () { + + }), + SizedBox(width: 12,), + InkWell( + child: Center( + child: Container( + height: screenSize.height * 0.070, + decoration: containerBorderDecoration( + Color(0xFF515A5D), Colors.black + ), + child: Center( + child: Padding( + padding: const EdgeInsets.all(8.0), + child: Text( + "Abnormal", + style: TextStyle( + fontSize: 12, + color: + Colors.white, //Colors.black, + fontWeight: FontWeight.bold, + ), + ), + ), + )), + ), + onTap: () { + + }), + ], + ), + Icon( + FontAwesomeIcons.trash, + color: Colors.grey, + size: 20, + ) + ], + ), + SizedBox( + height: 20, + ), + ], + ), + ) + ], + ) + ]), + isExpand: isSysExaminationExpand, + ), + DividerWithSpacesAround(height: 30,), AppButton( title: TranslationBase.of(context).next, - onPressed: () { - changePageViewIndex(2); - }, + onPressed: () {}, + ), + SizedBox( + height: 30, ), ], ), @@ -33,4 +224,255 @@ class ObjectivePage extends StatelessWidget { ), )); } + + openExaminationList(BuildContext context) { + final screenSize = MediaQuery.of(context).size; + InputDecoration textFieldSelectorDecoration( + String hintText, String selectedText, bool isDropDown) { + return InputDecoration( + focusedBorder: OutlineInputBorder( + borderSide: BorderSide(color: Color(0xFFCCCCCC), width: 2.0), + borderRadius: BorderRadius.circular(8), + ), + enabledBorder: OutlineInputBorder( + borderSide: BorderSide(color: Color(0xFFCCCCCC), width: 2.0), + borderRadius: BorderRadius.circular(8), + ), + disabledBorder: OutlineInputBorder( + borderSide: BorderSide(color: Color(0xFFCCCCCC), width: 2.0), + borderRadius: BorderRadius.circular(8), + ), + hintText: selectedText != null ? selectedText : hintText, + suffixIcon: isDropDown ? Icon(Icons.arrow_drop_down) : null, + hintStyle: TextStyle( + fontSize: 14, + color: Colors.grey.shade600, + ), + ); + } + + ; + showModalBottomSheet( + backgroundColor: Colors.white, + isScrollControlled: true, + context: context, + builder: (context) { + return FractionallySizedBox( + heightFactor: 0.7, + child: Container( + child: FractionallySizedBox( + widthFactor: 0.9, + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + SizedBox( + height: 16, + ), + AppText( + "Examinations", + fontWeight: FontWeight.bold, + fontSize: 16, + ), + SizedBox( + height: 16, + ), + Container( + height: MediaQuery.of(context).size.height * 0.5, + child: Center( + child: Container( + margin: EdgeInsets.only(top: 15), + decoration: BoxDecoration( + borderRadius: BorderRadius.circular(12), + color: Colors.white), + child: ListView( + children: [ + Column( + children: [ + Row( + children: [ + Checkbox( + value: true, + activeColor: Colors.red[800], + onChanged: (bool newValue) { + setState(() {}); + }), + Expanded( + child: Padding( + padding: const EdgeInsets.symmetric( + horizontal: 10, vertical: 0), + child: Texts('Examinations', + variant: "bodyText", + bold: true, + color: Colors.black), + ), + ), + ], + ), + DividerWithSpacesAround(), + Row( + children: [ + Checkbox( + value: true, + activeColor: Colors.red[800], + onChanged: (bool newValue) { + setState(() {}); + }), + Expanded( + child: Padding( + padding: const EdgeInsets.symmetric( + horizontal: 10, vertical: 0), + child: Texts('Examinations', + variant: "bodyText", + bold: true, + color: Colors.black), + ), + ), + ], + ), + DividerWithSpacesAround(), + Row( + children: [ + Checkbox( + value: true, + activeColor: Colors.red[800], + onChanged: (bool newValue) { + setState(() {}); + }), + Expanded( + child: Padding( + padding: const EdgeInsets.symmetric( + horizontal: 10, vertical: 0), + child: Texts('Examinations', + variant: "bodyText", + bold: true, + color: Colors.black), + ), + ), + ], + ), + DividerWithSpacesAround(), + Row( + children: [ + Checkbox( + value: true, + activeColor: Colors.red[800], + onChanged: (bool newValue) { + setState(() {}); + }), + Expanded( + child: Padding( + padding: const EdgeInsets.symmetric( + horizontal: 10, vertical: 0), + child: Texts('Examinations', + variant: "bodyText", + bold: true, + color: Colors.black), + ), + ), + ], + ), + DividerWithSpacesAround(), + Row( + children: [ + Checkbox( + value: true, + activeColor: Colors.red[800], + onChanged: (bool newValue) { + setState(() {}); + }), + Expanded( + child: Padding( + padding: const EdgeInsets.symmetric( + horizontal: 10, vertical: 0), + child: Texts('Examinations', + variant: "bodyText", + bold: true, + color: Colors.black), + ), + ), + ], + ), + DividerWithSpacesAround(), + Row( + children: [ + Checkbox( + value: true, + activeColor: Colors.red[800], + onChanged: (bool newValue) { + setState(() {}); + }), + Expanded( + child: Padding( + padding: const EdgeInsets.symmetric( + horizontal: 10, vertical: 0), + child: Texts('Examinations', + variant: "bodyText", + bold: true, + color: Colors.black), + ), + ), + ], + ), + DividerWithSpacesAround(), + Row( + children: [ + Checkbox( + value: true, + activeColor: Colors.red[800], + onChanged: (bool newValue) { + setState(() {}); + }), + Expanded( + child: Padding( + padding: const EdgeInsets.symmetric( + horizontal: 10, vertical: 0), + child: Texts('Examinations', + variant: "bodyText", + bold: true, + color: Colors.black), + ), + ), + ], + ), + DividerWithSpacesAround(), + Row( + children: [ + Checkbox( + value: true, + activeColor: Colors.red[800], + onChanged: (bool newValue) { + setState(() {}); + }), + Expanded( + child: Padding( + padding: const EdgeInsets.symmetric( + horizontal: 10, vertical: 0), + child: Texts('Examinations', + variant: "bodyText", + bold: true, + color: Colors.black), + ), + ), + ], + ), + DividerWithSpacesAround(), + ], + ), + ], + ), + )), + ), + SizedBox( + height: 10, + ), + AppButton( + title: "Add SELECTED Examinations".toUpperCase(), + onPressed: () {}, + ), + ]), + )), + ); + }); + } } + diff --git a/lib/widgets/patients/profile/SOAP/subjective/add_allergies_widget.dart b/lib/widgets/patients/profile/SOAP/subjective/add_allergies_widget.dart index 54c914f9..9fc21aa1 100644 --- a/lib/widgets/patients/profile/SOAP/subjective/add_allergies_widget.dart +++ b/lib/widgets/patients/profile/SOAP/subjective/add_allergies_widget.dart @@ -1,8 +1,10 @@ - import 'package:doctor_app_flutter/config/config.dart'; import 'package:doctor_app_flutter/util/translations_delegate_base.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_buttons_widget.dart'; +import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart'; +import 'package:doctor_app_flutter/widgets/shared/dialogs/dailog-list-select.dart'; import 'package:eva_icons_flutter/eva_icons_flutter.dart'; import 'package:flutter/material.dart'; import 'package:font_awesome_flutter/font_awesome_flutter.dart'; @@ -13,8 +15,21 @@ class AddAllergiesWidget extends StatefulWidget { } class _AddAllergiesWidgetState extends State { + + List allergiesList; + dynamic _referTo; + dynamic _selectedBranch; + dynamic _selectedClinic; + dynamic _selectedDoctor; + TextEditingController remarkController = TextEditingController(); + + @override Widget build(BuildContext context) { + final screenSize = MediaQuery + .of(context) + .size; + return Column( children: [ Container( @@ -95,7 +110,34 @@ class _AddAllergiesWidgetState extends State { ], ); } + openAllergiesList(BuildContext context) { + final screenSize = MediaQuery + .of(context) + .size; + InputDecoration textFieldSelectorDecoration(String hintText, + String selectedText, bool isDropDown) { + return InputDecoration( + focusedBorder: OutlineInputBorder( + borderSide: BorderSide(color: Color(0xFFCCCCCC), width: 2.0), + borderRadius: BorderRadius.circular(8), + ), + enabledBorder: OutlineInputBorder( + borderSide: BorderSide(color: Color(0xFFCCCCCC), width: 2.0), + borderRadius: BorderRadius.circular(8), + ), + disabledBorder: OutlineInputBorder( + borderSide: BorderSide(color: Color(0xFFCCCCCC), width: 2.0), + borderRadius: BorderRadius.circular(8), + ), + hintText: selectedText != null ? selectedText : hintText, + suffixIcon: isDropDown ? Icon(Icons.arrow_drop_down) : null, + hintStyle: TextStyle( + fontSize: 14, + color: Colors.grey.shade600, + ), + ); + }; showModalBottomSheet( backgroundColor: Colors.white, isScrollControlled: true, @@ -104,8 +146,147 @@ class _AddAllergiesWidgetState extends State { return FractionallySizedBox( heightFactor: 0.7, child: Container( - child: Center( - child: Texts("openAllergiesList"), + child: FractionallySizedBox( + widthFactor: 0.9, + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + + SizedBox( + height: 16, + ), + AppText( + "Add Allergy", + fontWeight: FontWeight.bold, + fontSize: 16, + ), + SizedBox( + height: 16, + ), + Container( + height: screenSize.height * 0.070, + child: InkWell( + onTap: allergiesList != null + ? () { + ListSelectDialog dialog = ListSelectDialog( + list: allergiesList, + attributeName: 'name', + attributeValueId: 'id', + okText: TranslationBase + .of(context) + .ok, + okFunction: (selectedValue) { + setState(() { + _referTo = selectedValue; + _selectedBranch = null; + _selectedClinic = null; + _selectedDoctor = null; + // model.getDoctorBranch().then((value) { + // _selectedBranch = value; + // if (_referTo['id'] == 1) { + // model.getClinics( + // _selectedBranch['ID']); + // } + // }); + }); + }, + ); + showDialog( + barrierDismissible: false, + context: context, + builder: (BuildContext context) { + return dialog; + }, + ); + } + : null, + child: TextField( + decoration: textFieldSelectorDecoration( + "Select Allergy", + _referTo != null ? _referTo['name'] : null, + true), + enabled: false, + ), + ), + ), + SizedBox( + height: 10, + ), Container( + height: screenSize.height * 0.070, + child: InkWell( + onTap: allergiesList != null + ? () { + ListSelectDialog dialog = ListSelectDialog( + list: allergiesList, + attributeName: 'name', + attributeValueId: 'id', + okText: TranslationBase + .of(context) + .ok, + okFunction: (selectedValue) { + setState(() { + _referTo = selectedValue; + _selectedBranch = null; + _selectedClinic = null; + _selectedDoctor = null; + // model.getDoctorBranch().then((value) { + // _selectedBranch = value; + // if (_referTo['id'] == 1) { + // model.getClinics( + // _selectedBranch['ID']); + // } + // }); + }); + }, + ); + showDialog( + barrierDismissible: false, + context: context, + builder: (BuildContext context) { + return dialog; + }, + ); + } + : null, + child: TextField( + decoration: textFieldSelectorDecoration( + "Select Severity", + _referTo != null ? _referTo['name'] : null, + true), + enabled: false, + ), + ), + ), + SizedBox( + height: 10, + ), + Container( + margin: EdgeInsets.only(left: 0, right: 0, top: 15), + child: TextFields( + hintText: "Remarks", + fontSize: 13.5, + // hintColor: Colors.black, + fontWeight: FontWeight.w600, + maxLines: 25, + minLines: 13, + controller: remarkController, + validator: (value) { + if (value == null) + return TranslationBase.of(context).emptyMessage; + else + return null; + }), + ),SizedBox( + height: 10, + ), + AppButton( + title: "Add".toUpperCase(), + onPressed: () { + }, + ), + ] + + ), )), ); }); @@ -113,3 +294,4 @@ class _AddAllergiesWidgetState extends State { } + diff --git a/lib/widgets/patients/profile/SOAP/subjective/add_history_widget.dart b/lib/widgets/patients/profile/SOAP/subjective/add_history_widget.dart index 55df7a68..ef08b28d 100644 --- a/lib/widgets/patients/profile/SOAP/subjective/add_history_widget.dart +++ b/lib/widgets/patients/profile/SOAP/subjective/add_history_widget.dart @@ -3,23 +3,40 @@ import 'package:doctor_app_flutter/config/config.dart'; import 'package:doctor_app_flutter/util/translations_delegate_base.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_buttons_widget.dart'; +import 'package:doctor_app_flutter/widgets/shared/divider_with_spaces_around.dart'; import 'package:eva_icons_flutter/eva_icons_flutter.dart'; import 'package:flutter/material.dart'; import 'package:font_awesome_flutter/font_awesome_flutter.dart'; +import 'package:hexcolor/hexcolor.dart'; class AddHistoryWidget extends StatefulWidget { @override _AddHistoryWidgetState createState() => _AddHistoryWidgetState(); } -class _AddHistoryWidgetState extends State { +class _AddHistoryWidgetState extends State + with TickerProviderStateMixin { + PageController _controller; + int _currentIndex = 0; + + changePageViewIndex(pageIndex) { + _controller.jumpToPage(pageIndex); + } + + @override + void initState() { + _controller = new PageController(); + + super.initState(); + } + @override Widget build(BuildContext context) { return Column( children: [ Container( - margin: - EdgeInsets.only(left: 10, right: 10, top: 15), + margin: EdgeInsets.only(left: 10, right: 10, top: 15), child: TextFields( hintText: "Add History", fontSize: 13.5, @@ -87,6 +104,7 @@ class _AddHistoryWidgetState extends State { ], ); } + openHistoryList(BuildContext context) { showModalBottomSheet( backgroundColor: Colors.white, @@ -96,12 +114,323 @@ class _AddHistoryWidgetState extends State { return FractionallySizedBox( heightFactor: 0.7, child: Container( - child: Center( - child: Texts("HistoryList"), - )), + child: FractionallySizedBox( + widthFactor: 0.9, + child: Column( + children: [ + SizedBox( + height: 10, + ), + PriorityBar(onTap: (activePriority) { + changePageViewIndex(activePriority); + }), + SizedBox( + height: 20, + ), + Expanded( + child: PageView( + physics: NeverScrollableScrollPhysics(), + controller: _controller, + onPageChanged: (index) { + setState(() { + _currentIndex = index; + }); + }, + scrollDirection: Axis.horizontal, + children: [ + Column( + children: [ + Container( + height: MediaQuery.of(context).size.height * 0.5, + child: Center( + child: Container( + margin: EdgeInsets.only(top: 15), + decoration: BoxDecoration( + borderRadius: BorderRadius.circular(12), + color: Colors.white), + child: ListView( + children: [ + Column( + children: [ + Row( + children: [ + Checkbox( + value: true, + activeColor: Colors.red[800], + onChanged: (bool newValue) { + setState(() {}); + }), + Expanded( + child: Padding( + padding: const EdgeInsets.symmetric( + horizontal: 10, vertical: 0), + child: Texts('History', + variant: "bodyText", + bold: true, + color: Colors.black), + ), + ), + ], + ), + DividerWithSpacesAround(), + Row( + children: [ + Checkbox( + value: true, + activeColor: Colors.red[800], + onChanged: (bool newValue) { + setState(() {}); + }), + Expanded( + child: Padding( + padding: const EdgeInsets.symmetric( + horizontal: 10, vertical: 0), + child: Texts('History', + variant: "bodyText", + bold: true, + color: Colors.black), + ), + ), + ], + ), + DividerWithSpacesAround(), + Row( + children: [ + Checkbox( + value: true, + activeColor: Colors.red[800], + onChanged: (bool newValue) { + setState(() {}); + }), + Expanded( + child: Padding( + padding: const EdgeInsets.symmetric( + horizontal: 10, vertical: 0), + child: Texts('History', + variant: "bodyText", + bold: true, + color: Colors.black), + ), + ), + ], + ), + DividerWithSpacesAround(), + Row( + children: [ + Checkbox( + value: true, + activeColor: Colors.red[800], + onChanged: (bool newValue) { + setState(() {}); + }), + Expanded( + child: Padding( + padding: const EdgeInsets.symmetric( + horizontal: 10, vertical: 0), + child: Texts('History', + variant: "bodyText", + bold: true, + color: Colors.black), + ), + ), + ], + ), + DividerWithSpacesAround(), + Row( + children: [ + Checkbox( + value: true, + activeColor: Colors.red[800], + onChanged: (bool newValue) { + setState(() {}); + }), + Expanded( + child: Padding( + padding: const EdgeInsets.symmetric( + horizontal: 10, vertical: 0), + child: Texts('History', + variant: "bodyText", + bold: true, + color: Colors.black), + ), + ), + ], + ), + DividerWithSpacesAround(), + Row( + children: [ + Checkbox( + value: true, + activeColor: Colors.red[800], + onChanged: (bool newValue) { + setState(() {}); + }), + Expanded( + child: Padding( + padding: const EdgeInsets.symmetric( + horizontal: 10, vertical: 0), + child: Texts('History', + variant: "bodyText", + bold: true, + color: Colors.black), + ), + ), + ], + ), + DividerWithSpacesAround(), + Row( + children: [ + Checkbox( + value: true, + activeColor: Colors.red[800], + onChanged: (bool newValue) { + setState(() {}); + }), + Expanded( + child: Padding( + padding: const EdgeInsets.symmetric( + horizontal: 10, vertical: 0), + child: Texts('History', + variant: "bodyText", + bold: true, + color: Colors.black), + ), + ), + ], + ), + DividerWithSpacesAround(), + Row( + children: [ + Checkbox( + value: true, + activeColor: Colors.red[800], + onChanged: (bool newValue) { + setState(() {}); + }), + Expanded( + child: Padding( + padding: const EdgeInsets.symmetric( + horizontal: 10, vertical: 0), + child: Texts('History', + variant: "bodyText", + bold: true, + color: Colors.black), + ), + ), + ], + ), + DividerWithSpacesAround(), + ], + ), + ], + ), + )), + ), + SizedBox( + height: 10, + ), + AppButton( + title: "Add SELECTED HISTORIES".toUpperCase(), + onPressed: () {}, + ), + ], + ), + Container( + child: Center( + child: Texts("eee"), + ), + ), + Container( + child: Center( + child: Texts("cccc"), + ), + ), + ], + ), + ), + ], + ), + )), ); }); } +} + +class PriorityBar extends StatefulWidget { + final Function onTap; + + const PriorityBar({Key key, this.onTap}) : super(key: key); + @override + _PriorityBarState createState() => _PriorityBarState(); } +class _PriorityBarState extends State { + int _activePriority = 0; + + List _priorities = [ + "Family", + "Surgical/Sports", + "Medical", + ]; + + BoxDecoration containerBorderDecoration( + Color containerColor, Color borderColor) { + return BoxDecoration( + color: containerColor, + shape: BoxShape.rectangle, + borderRadius: BorderRadius.all(Radius.circular(6)), + border: Border.fromBorderSide(BorderSide( + color: borderColor, + width: 2.0, + )), + ); + } + + @override + Widget build(BuildContext context) { + final screenSize = MediaQuery.of(context).size; + + return Container( + height: screenSize.height * 0.070, + decoration: + containerBorderDecoration(Color(0Xffffffff), Color(0xFFCCCCCC)), + child: Row( + mainAxisSize: MainAxisSize.max, + crossAxisAlignment: CrossAxisAlignment.center, + children: _priorities.map((item) { + bool _isActive = _priorities[_activePriority] == item ? true : false; + return Expanded( + child: InkWell( + child: Center( + child: Container( + height: screenSize.height * 0.070, + decoration: containerBorderDecoration( + _isActive ? HexColor("#B8382B") : Colors.white, + _isActive ? HexColor("#B8382B") : Colors.white), + child: Center( + child: Text( + item, + style: TextStyle( + fontSize: 12, + color: _isActive + ? Colors.white + : Colors.black, //Colors.black, + fontWeight: FontWeight.bold, + ), + ), + )), + ), + onTap: () { + widget.onTap(_priorities.indexOf(item)); + + setState(() { + _activePriority = _priorities.indexOf(item); + }); + }), + ); + }).toList(), + ), + ); + } +} diff --git a/lib/widgets/patients/profile/SOAP/subjective/subjective_page.dart b/lib/widgets/patients/profile/SOAP/subjective/subjective_page.dart index b5fc805e..ce43b6c3 100644 --- a/lib/widgets/patients/profile/SOAP/subjective/subjective_page.dart +++ b/lib/widgets/patients/profile/SOAP/subjective/subjective_page.dart @@ -22,7 +22,7 @@ class SubjectivePage extends StatefulWidget { } class _SubjectivePageState extends State { - bool isChiefExpand = true; + bool isChiefExpand = false; bool isHistoryExpand = false; bool isAllergiesExpand = false; @@ -30,6 +30,7 @@ class _SubjectivePageState extends State { @override Widget build(BuildContext context) { + return AppScaffold( isShowAppBar: false, body: SingleChildScrollView( diff --git a/lib/widgets/shared/divider_with_spaces_around.dart b/lib/widgets/shared/divider_with_spaces_around.dart new file mode 100644 index 00000000..b43557cb --- /dev/null +++ b/lib/widgets/shared/divider_with_spaces_around.dart @@ -0,0 +1,27 @@ +import 'package:flutter/material.dart'; + +class DividerWithSpacesAround extends StatelessWidget { + DividerWithSpacesAround({ + Key key, this.height = 0, + }); + final double height ; + + @override + Widget build(BuildContext context) { + return Column( + children: [ + SizedBox( + height: height, + ), + Container( + width: double.infinity, + height: 1, + color: Color(0xffCCCCCC), + ), + SizedBox( + height: height, + ), + ], + ); + } +}