From dcba85c7b9b017dbdd116259f72842103e4244fd Mon Sep 17 00:00:00 2001 From: Elham Rababah Date: Fri, 18 Dec 2020 19:53:46 +0200 Subject: [PATCH] Finish first step subjective_page.dart --- lib/config/localized_values.dart | 4 + lib/util/translations_delegate_base.dart | 2 + .../patients/profile/SOAP/add_SOAP_index.dart | 226 ++++++++-------- .../SOAP/subjective/add_allergies_widget.dart | 115 +++++++++ .../SOAP/subjective/add_history_widget.dart | 107 ++++++++ .../subjective/add_medication_widget.dart | 107 ++++++++ .../SOAP/subjective/subjective_page.dart | 242 ++++++++++++++++++ .../profile/SOAP/subjective_page.dart | 56 ---- lib/widgets/shared/TextFields.dart | 4 +- 9 files changed, 694 insertions(+), 169 deletions(-) create mode 100644 lib/widgets/patients/profile/SOAP/subjective/add_allergies_widget.dart create mode 100644 lib/widgets/patients/profile/SOAP/subjective/add_history_widget.dart create mode 100644 lib/widgets/patients/profile/SOAP/subjective/add_medication_widget.dart create mode 100644 lib/widgets/patients/profile/SOAP/subjective/subjective_page.dart delete mode 100644 lib/widgets/patients/profile/SOAP/subjective_page.dart diff --git a/lib/config/localized_values.dart b/lib/config/localized_values.dart index 8ae95c74..e205bb4e 100644 --- a/lib/config/localized_values.dart +++ b/lib/config/localized_values.dart @@ -279,4 +279,8 @@ const Map> localizedValues = { 'healthRecordInformation': {'en': 'HEALTH RECORD INFORMATION', 'ar': 'معلومات السجل الصحي'}, 'clinicSelect': {'en': "Select Clinic", 'ar': 'اختار عيادة'}, 'doctorSelect': {'en': "Select Doctor", 'ar': 'اختار طبيب'}, + "empty-message": { + "en": "Please enter message", + "ar": "يرجى ادخال الموضوع" + }, }; diff --git a/lib/util/translations_delegate_base.dart b/lib/util/translations_delegate_base.dart index c60a65d3..7292492d 100644 --- a/lib/util/translations_delegate_base.dart +++ b/lib/util/translations_delegate_base.dart @@ -299,6 +299,8 @@ class TranslationBase { String get bed => localizedValues['bed'][locale.languageCode]; String get next => localizedValues['next'][locale.languageCode]; String get healthRecordInformation => localizedValues['healthRecordInformation'][locale.languageCode]; + String get emptyMessage => localizedValues['empty-message'][locale.languageCode]; + } class TranslationBaseDelegate extends LocalizationsDelegate { diff --git a/lib/widgets/patients/profile/SOAP/add_SOAP_index.dart b/lib/widgets/patients/profile/SOAP/add_SOAP_index.dart index a74e5c51..2018a582 100644 --- a/lib/widgets/patients/profile/SOAP/add_SOAP_index.dart +++ b/lib/widgets/patients/profile/SOAP/add_SOAP_index.dart @@ -6,7 +6,7 @@ import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; import 'package:doctor_app_flutter/widgets/patients/profile/SOAP/assessment_page.dart'; import 'package:doctor_app_flutter/widgets/patients/profile/SOAP/objective_page.dart'; import 'package:doctor_app_flutter/widgets/patients/profile/SOAP/plan_page.dart'; -import 'package:doctor_app_flutter/widgets/patients/profile/SOAP/subjective_page.dart'; +import 'package:doctor_app_flutter/widgets/patients/profile/SOAP/subjective/subjective_page.dart'; import 'package:doctor_app_flutter/widgets/shared/Text.dart'; import 'package:doctor_app_flutter/widgets/shared/app_buttons_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart'; @@ -46,124 +46,126 @@ class _AddSOAPIndexState extends State builder: (_, model, w) => AppScaffold( baseViewModel: model, appBarTitle: TranslationBase.of(context).healthRecordInformation, - body: Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Container( - decoration: - BoxDecoration(boxShadow: [], color: Colors.white), - child: Column( - mainAxisAlignment: MainAxisAlignment.start, - children: [ - Padding( - padding: const EdgeInsets.all(8.0), - child: Row( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - AvatarWidget( - Icon( - patient.genderDescription == "Male" - ? DoctorApp.male - : DoctorApp.female_icon, - size: 70, - color: Colors.white, - ), - ), - SizedBox( - width: 20, - ), - Column( - crossAxisAlignment: CrossAxisAlignment.start, - mainAxisAlignment: MainAxisAlignment.start, - children: [ - SizedBox( - height: 5, - ), - AppText( - patient.firstName + ' ' + patient.lastName, - color: Colors.black, - fontWeight: FontWeight.bold, + body: SingleChildScrollView( + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Container( + decoration: + BoxDecoration(boxShadow: [], color: Colors.white), + child: Column( + mainAxisAlignment: MainAxisAlignment.start, + children: [ + Padding( + padding: const EdgeInsets.all(8.0), + child: Row( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + AvatarWidget( + Icon( + patient.genderDescription == "Male" + ? DoctorApp.male + : DoctorApp.female_icon, + size: 70, + color: Colors.white, ), - Row( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - AppText( - TranslationBase.of(context).age, - color: Colors.black, - fontWeight: FontWeight.bold, - ), - SizedBox( - width: 20, - ), - AppText( - patient.age.toString(), - color: Colors.black, - fontWeight: FontWeight.normal, - ), - ], - ), - AppText( - "ALLERGIC TO: FOOD, ASPIRIN, EGG WHITE", - color: Color(0xFFB9382C), - fontWeight: FontWeight.bold, - ), - ], - ) - ], - ), - ), - Container( - width: double.infinity, - height: 1, - color: Color(0xffCCCCCC), - ), - SizedBox( - width: 20, - ), - FractionallySizedBox( - child: SingleChildScrollView( - child: Container( - height: MediaQuery.of(context).size.height * 0.75, - child: Column( - children: [ - Container( - 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, + ), + SizedBox( + width: 20, + ), + Column( + crossAxisAlignment: CrossAxisAlignment.start, + mainAxisAlignment: MainAxisAlignment.start, + children: [ + SizedBox( + height: 5, ), - ), - Expanded( - child: PageView( - physics: NeverScrollableScrollPhysics(), - controller: _controller, - onPageChanged: (index) { - setState(() { - _currentIndex = index; - }); - }, - scrollDirection: Axis.horizontal, - children: [ - SubjectivePage(changePageViewIndex: changePageViewIndex,), - ObjectivePage(changePageViewIndex: changePageViewIndex,), - AssessmentPage(changePageViewIndex: changePageViewIndex,), - PlanPage(changePageViewIndex: changePageViewIndex,) + AppText( + patient.firstName + ' ' + patient.lastName, + color: Colors.black, + fontWeight: FontWeight.bold, + ), + Row( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + AppText( + TranslationBase.of(context).age, + color: Colors.black, + fontWeight: FontWeight.bold, + ), + SizedBox( + width: 20, + ), + AppText( + patient.age.toString(), + color: Colors.black, + fontWeight: FontWeight.normal, + ), ], ), - ), - ], - ), + AppText( + "ALLERGIC TO: FOOD, ASPIRIN, EGG WHITE", + color: Color(0xFFB9382C), + fontWeight: FontWeight.bold, + ), + ], + ) + ], ), ), - ) - ], + Container( + width: double.infinity, + height: 1, + color: Color(0xffCCCCCC), + ), + SizedBox( + width: 20, + ), + FractionallySizedBox( + child: SingleChildScrollView( + child: Container( + height: MediaQuery.of(context).size.height * 0.75, + child: Column( + children: [ + Container( + 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, + ), + ), + Expanded( + child: PageView( + physics: NeverScrollableScrollPhysics(), + controller: _controller, + onPageChanged: (index) { + setState(() { + _currentIndex = index; + }); + }, + scrollDirection: Axis.horizontal, + children: [ + SubjectivePage(changePageViewIndex: changePageViewIndex,), + ObjectivePage(changePageViewIndex: changePageViewIndex,), + AssessmentPage(changePageViewIndex: changePageViewIndex,), + PlanPage(changePageViewIndex: changePageViewIndex,) + ], + ), + ), + ], + ), + ), + ), + ) + ], + ), ), - ), - ], + ], + ), ), ), ); diff --git a/lib/widgets/patients/profile/SOAP/subjective/add_allergies_widget.dart b/lib/widgets/patients/profile/SOAP/subjective/add_allergies_widget.dart new file mode 100644 index 00000000..54c914f9 --- /dev/null +++ b/lib/widgets/patients/profile/SOAP/subjective/add_allergies_widget.dart @@ -0,0 +1,115 @@ + +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:eva_icons_flutter/eva_icons_flutter.dart'; +import 'package:flutter/material.dart'; +import 'package:font_awesome_flutter/font_awesome_flutter.dart'; + +class AddAllergiesWidget extends StatefulWidget { + @override + _AddAllergiesWidgetState createState() => _AddAllergiesWidgetState(); +} + +class _AddAllergiesWidgetState extends State { + @override + Widget build(BuildContext context) { + return Column( + children: [ + Container( + margin: + EdgeInsets.only(left: 10, right: 10, top: 15), + child: TextFields( + hintText: "Add Allergies", + fontSize: 13.5, + onTapTextFields: () { + openAllergiesList(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('White Egg'.toUpperCase(), + variant: "bodyText", + bold: true, + color: Colors.black), + Texts('Severe'.toUpperCase(), + variant: "bodyText", + bold: true, + color: AppGlobal.appPrimaryColor), + Icon( + FontAwesomeIcons.trash, + color: Colors.grey, + size: 20, + ) + ], + ), + SizedBox( + height: 20, + ), + Row( + mainAxisAlignment: + MainAxisAlignment.spaceBetween, + children: [ + Texts('White Egg'.toUpperCase(), + variant: "bodyText", + bold: true, + color: Colors.black), + Texts('Severe'.toUpperCase(), + variant: "bodyText", + bold: true, + color: AppGlobal.appPrimaryColor), + Icon( + FontAwesomeIcons.trash, + color: Colors.grey, + size: 20, + ) + ], + ), + ], + ), + ) + ], + ); + } + openAllergiesList(BuildContext context) { + showModalBottomSheet( + backgroundColor: Colors.white, + isScrollControlled: true, + context: context, + builder: (context) { + return FractionallySizedBox( + heightFactor: 0.7, + child: Container( + child: Center( + child: Texts("openAllergiesList"), + )), + ); + }); + } + +} + diff --git a/lib/widgets/patients/profile/SOAP/subjective/add_history_widget.dart b/lib/widgets/patients/profile/SOAP/subjective/add_history_widget.dart new file mode 100644 index 00000000..55df7a68 --- /dev/null +++ b/lib/widgets/patients/profile/SOAP/subjective/add_history_widget.dart @@ -0,0 +1,107 @@ + +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:eva_icons_flutter/eva_icons_flutter.dart'; +import 'package:flutter/material.dart'; +import 'package:font_awesome_flutter/font_awesome_flutter.dart'; + +class AddHistoryWidget extends StatefulWidget { + @override + _AddHistoryWidgetState createState() => _AddHistoryWidgetState(); +} + +class _AddHistoryWidgetState extends State { + @override + Widget build(BuildContext context) { + return Column( + children: [ + Container( + margin: + EdgeInsets.only(left: 10, right: 10, top: 15), + child: TextFields( + hintText: "Add History", + fontSize: 13.5, + onTapTextFields: () { + openHistoryList(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 Pain', + variant: "bodyText", + bold: true, + color: Colors.black), + Icon( + FontAwesomeIcons.trash, + color: Colors.grey, + size: 20, + ) + ], + ), + SizedBox( + height: 20, + ), + Row( + mainAxisAlignment: + MainAxisAlignment.spaceBetween, + children: [ + Texts('Back Pain', + variant: "bodyText", + bold: true, + color: Colors.black), + Icon( + FontAwesomeIcons.trash, + color: Colors.grey, + size: 20, + ) + ], + ), + ], + ), + ) + ], + ); + } + openHistoryList(BuildContext context) { + showModalBottomSheet( + backgroundColor: Colors.white, + isScrollControlled: true, + context: context, + builder: (context) { + return FractionallySizedBox( + heightFactor: 0.7, + child: Container( + child: Center( + child: Texts("HistoryList"), + )), + ); + }); + } + +} + diff --git a/lib/widgets/patients/profile/SOAP/subjective/add_medication_widget.dart b/lib/widgets/patients/profile/SOAP/subjective/add_medication_widget.dart new file mode 100644 index 00000000..1db7c2e0 --- /dev/null +++ b/lib/widgets/patients/profile/SOAP/subjective/add_medication_widget.dart @@ -0,0 +1,107 @@ + +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:eva_icons_flutter/eva_icons_flutter.dart'; +import 'package:flutter/material.dart'; +import 'package:font_awesome_flutter/font_awesome_flutter.dart'; + +class AddMedication extends StatefulWidget { + @override + _AddMedicationState createState() => _AddMedicationState(); +} + +class _AddMedicationState extends State { + @override + Widget build(BuildContext context) { + return Column( + children: [ + Container( + margin: + EdgeInsets.only(left: 10, right: 10, top: 15), + child: TextFields( + hintText: "Current Medications", + fontSize: 13.5, + onTapTextFields: () { + openMedicationsList(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 Pain', + variant: "bodyText", + bold: true, + color: Colors.black), + Icon( + FontAwesomeIcons.trash, + color: Colors.grey, + size: 20, + ) + ], + ), + SizedBox( + height: 20, + ), + Row( + mainAxisAlignment: + MainAxisAlignment.spaceBetween, + children: [ + Texts('Back Pain', + variant: "bodyText", + bold: true, + color: Colors.black), + Icon( + FontAwesomeIcons.trash, + color: Colors.grey, + size: 20, + ) + ], + ), + ], + ), + ) + ], + ); + } + openMedicationsList(BuildContext context) { + showModalBottomSheet( + backgroundColor: Colors.white, + isScrollControlled: true, + context: context, + builder: (context) { + return FractionallySizedBox( + heightFactor: 0.7, + child: Container( + child: Center( + child: Texts("dfdfd"), + )), + ); + }); + } + +} + diff --git a/lib/widgets/patients/profile/SOAP/subjective/subjective_page.dart b/lib/widgets/patients/profile/SOAP/subjective/subjective_page.dart new file mode 100644 index 00000000..b5fc805e --- /dev/null +++ b/lib/widgets/patients/profile/SOAP/subjective/subjective_page.dart @@ -0,0 +1,242 @@ +import 'package:doctor_app_flutter/config/config.dart'; +import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; +import 'package:doctor_app_flutter/widgets/patients/profile/SOAP/subjective/add_allergies_widget.dart'; +import 'package:doctor_app_flutter/widgets/patients/profile/SOAP/subjective/add_history_widget.dart'; +import 'package:doctor_app_flutter/widgets/patients/profile/SOAP/subjective/add_medication_widget.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/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'; + +class SubjectivePage extends StatefulWidget { + final Function changePageViewIndex; + + SubjectivePage({Key key, this.changePageViewIndex}); + + @override + _SubjectivePageState createState() => _SubjectivePageState(); +} + +class _SubjectivePageState extends State { + bool isChiefExpand = true; + bool isHistoryExpand = false; + bool isAllergiesExpand = false; + + TextEditingController messageController = TextEditingController(); + + @override + Widget build(BuildContext context) { + return AppScaffold( + isShowAppBar: false, + body: SingleChildScrollView( + physics: ScrollPhysics(), + child: Center( + child: FractionallySizedBox( + widthFactor: 0.9, + child: Column( + mainAxisAlignment: MainAxisAlignment.start, + children: [ + SizedBox( + height: 30, + ), + HeaderBodyExpandableNotifier( + headerWidget: Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + Row( + children: [ + Texts('CHIEF COMPLAINTS', + variant: isChiefExpand ? "bodyText" : '', + bold: isChiefExpand ? true : false, + color: Colors.black), + Icon( + FontAwesomeIcons.asterisk, + color: AppGlobal.appPrimaryColor, + size: 12, + ) + ], + ), + InkWell( + onTap: () { + setState(() { + isChiefExpand = !isChiefExpand; + }); + }, + child: Icon( + isChiefExpand ? EvaIcons.minus : EvaIcons.plus)) + ], + ), + bodyWidget: Column(children: [ + SizedBox( + height: 20, + ), + Container( + margin: EdgeInsets.only(left: 10, right: 10, top: 15), + child: TextFields( + hintText: "Add Chief Complaints", + fontSize: 13.5, + // hintColor: Colors.black, + fontWeight: FontWeight.w600, + maxLines: 25, + minLines: 13, + controller: messageController, + validator: (value) { + if (value == null) + return TranslationBase.of(context).emptyMessage; + else + return null; + }), + ), + SizedBox( + height: 20, + ), + Container( + margin: EdgeInsets.only(left: 10, right: 10, top: 15), + child: TextFields( + hintText: "History of Present Illness", + fontSize: 13.5, + // hintColor: Colors.black, + fontWeight: FontWeight.w600, + maxLines: 25, + minLines: 13, + controller: messageController, + validator: (value) { + if (value == null) + return TranslationBase.of(context).emptyMessage; + else + return null; + }), + ), + SizedBox( + height: 20, + ), + AddMedication(), + ]), + isExpand: isChiefExpand, + ), + + SizedBox( + height: 30, + ), + Container( + width: double.infinity, + height: 1, + color: Color(0xffCCCCCC), + ), + SizedBox( + height: 30, + ), + HeaderBodyExpandableNotifier( + headerWidget: Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + Row( + children: [ + Texts('History', + variant: isHistoryExpand ? "bodyText" : '', + bold: isHistoryExpand ? true : false, + color: Colors.black), + Icon( + FontAwesomeIcons.asterisk, + color: AppGlobal.appPrimaryColor, + size: 12, + ) + ], + ), + InkWell( + onTap: () { + setState(() { + isHistoryExpand = !isHistoryExpand; + }); + }, + child: Icon(isHistoryExpand + ? EvaIcons.minus + : EvaIcons.plus)) + ], + ), + bodyWidget: Column( + children: [ + AddHistoryWidget() + ], + ), + isExpand: isHistoryExpand, + ), + SizedBox( + height: 30, + ), + Container( + width: double.infinity, + height: 1, + color: Color(0xffCCCCCC), + ), + SizedBox( + height: 30, + ), + HeaderBodyExpandableNotifier( + headerWidget: Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + Row( + children: [ + Texts('Allergies', + variant: isAllergiesExpand ? "bodyText" : '', + bold: isAllergiesExpand ? true : false, + color: Colors.black), + Icon( + FontAwesomeIcons.asterisk, + color: AppGlobal.appPrimaryColor, + size: 12, + ) + ], + ), + InkWell( + onTap: () { + setState(() { + isAllergiesExpand = !isAllergiesExpand; + }); + }, + child: Icon(isAllergiesExpand + ? EvaIcons.minus + : EvaIcons.plus)) + ], + ), + bodyWidget:Column( + children: [ + AddAllergiesWidget(), + SizedBox( + height: 30, + ), + ], + ) + , + isExpand: isAllergiesExpand, + ), + SizedBox( + height: 30, + ), + Container( + width: double.infinity, + height: 1, + color: Color(0xffCCCCCC), + ), + SizedBox( + height: 30, + ), + AppButton( + title: TranslationBase.of(context).next, + onPressed: () { + widget.changePageViewIndex(1); + }, + ), + ], + ), + ), + ), + )); + } + +} diff --git a/lib/widgets/patients/profile/SOAP/subjective_page.dart b/lib/widgets/patients/profile/SOAP/subjective_page.dart deleted file mode 100644 index fd6a6e50..00000000 --- a/lib/widgets/patients/profile/SOAP/subjective_page.dart +++ /dev/null @@ -1,56 +0,0 @@ -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/app_buttons_widget.dart'; -import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart'; -import 'package:eva_icons_flutter/eva_icons_flutter.dart'; -import 'package:flutter/material.dart'; -import 'package:font_awesome_flutter/font_awesome_flutter.dart'; - -class SubjectivePage extends StatelessWidget { - final Function changePageViewIndex; - - SubjectivePage({Key key, this.changePageViewIndex}); - - @override - Widget build(BuildContext context) { - return AppScaffold( - isShowAppBar: false, -// baseViewModel: widget.model, - body: SingleChildScrollView( - physics: ScrollPhysics(), - child: Center( - child: FractionallySizedBox( - widthFactor: 0.9, - child: Column( - mainAxisAlignment: MainAxisAlignment.start, - children: [ - SizedBox(height: 30,), - Row(children: [ - Row( - children: [ - Texts('ASSESSMENT', - variant: "bodyText", - bold: true, - color: Colors.black), - Icon(FontAwesomeIcons.asterisk, color: AppGlobal.appPrimaryColor, - size: 12, - ) - ], - ), - Icon(EvaIcons.plus) - ],), - - AppButton( - title: TranslationBase.of(context).next, - onPressed: () { - changePageViewIndex(1); - }, - ), - ], - ), - ), - ), - )); - } -} diff --git a/lib/widgets/shared/TextFields.dart b/lib/widgets/shared/TextFields.dart index 269ad660..e41b4379 100644 --- a/lib/widgets/shared/TextFields.dart +++ b/lib/widgets/shared/TextFields.dart @@ -8,7 +8,7 @@ class TextFields extends StatefulWidget { TextFields({Key key, this.type, this.hintText, this.suffixIcon, this.autoFocus, this.onChanged, this.initialValue, this.minLines, this.maxLines, this.inputFormatters, this.padding, this.focus=false, this.maxLengthEnforced=true, this.suffixIconColor, this.inputAction, this.onSubmit, this.keepPadding=true, this.textCapitalization = TextCapitalization.none, this.onTap, this.controller, this.keyboardType, this.validator, this.borderOnlyError=false, - this.onSaved, this.onSuffixTap, this.readOnly: false, this.maxLength, this.prefixIcon, this.bare=false, this.fontSize=16.0, this.fontWeight=FontWeight.w700, this.autoValidate=false}) : super(key: key); + this.onSaved, this.onSuffixTap, this.readOnly: false, this.maxLength, this.prefixIcon, this.bare=false, this.fontSize=16.0, this.fontWeight=FontWeight.w700, this.autoValidate=false, this.onTapTextFields}) : super(key: key); final String hintText; final String initialValue; @@ -18,6 +18,7 @@ class TextFields extends StatefulWidget { final Color suffixIconColor; final IconData prefixIcon; final VoidCallback onTap; + final Function onTapTextFields; final TextEditingController controller; final TextInputType keyboardType; final FormFieldValidator validator; @@ -112,6 +113,7 @@ class _TextFieldsState extends State { boxShadow: [BoxShadow(color: Color.fromRGBO(70, 68, 167, focus ? 0.20 : 0), offset: Offset(0.0, 13.0), blurRadius: focus ? 34.0 : 12.0)] ), child: TextFormField( + onTap: widget.onTapTextFields, keyboardAppearance: Theme.of(context).brightness, scrollPhysics: BouncingScrollPhysics(), autovalidate: widget.autoValidate,