You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
243 lines
9.4 KiB
Dart
243 lines
9.4 KiB
Dart
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);
|
|
},
|
|
),
|
|
],
|
|
),
|
|
),
|
|
),
|
|
));
|
|
}
|
|
|
|
}
|