Finish first step subjective_page.dart
parent
518c30bdeb
commit
dcba85c7b9
@ -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<AddAllergiesWidget> {
|
||||
@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"),
|
||||
)),
|
||||
);
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -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<AddHistoryWidget> {
|
||||
@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"),
|
||||
)),
|
||||
);
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -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<AddMedication> {
|
||||
@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"),
|
||||
)),
|
||||
);
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -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<SubjectivePage> {
|
||||
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);
|
||||
},
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
));
|
||||
}
|
||||
|
||||
}
|
||||
@ -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);
|
||||
},
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
));
|
||||
}
|
||||
}
|
||||
Loading…
Reference in New Issue