WD: History of present illness
parent
4ca9ffc5c4
commit
63c1bc4cae
@ -0,0 +1,200 @@
|
|||||||
|
import 'package:flutter/material.dart';
|
||||||
|
|
||||||
|
import '../../../../../../utils/translations_delegate_base_utils.dart';
|
||||||
|
import '../../../../../../widgets/shared/app_texts_widget.dart';
|
||||||
|
import '../../../../../../widgets/shared/text_fields/app-textfield-custom.dart';
|
||||||
|
|
||||||
|
class UpdatePresentIllness extends StatefulWidget {
|
||||||
|
@override
|
||||||
|
State<UpdatePresentIllness> createState() => _UpdatePresentIllnessState();
|
||||||
|
}
|
||||||
|
|
||||||
|
class _UpdatePresentIllnessState extends State<UpdatePresentIllness> {
|
||||||
|
bool isPatientSelected = false;
|
||||||
|
bool isFamilySelected = false;
|
||||||
|
bool isOtherSelected = false;
|
||||||
|
|
||||||
|
final TextEditingController familyController = TextEditingController();
|
||||||
|
final TextEditingController otherController = TextEditingController();
|
||||||
|
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
return Column(
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
|
children: [
|
||||||
|
SizedBox(
|
||||||
|
height: 8,
|
||||||
|
),
|
||||||
|
AppText(
|
||||||
|
TranslationBase.of(context).historyTakenFrom,
|
||||||
|
fontSize: 14,
|
||||||
|
fontWeight: FontWeight.w600,
|
||||||
|
textAlign: TextAlign.start,
|
||||||
|
color: Colors.black,
|
||||||
|
),
|
||||||
|
|
||||||
|
ListTileTheme(
|
||||||
|
horizontalTitleGap: 0,
|
||||||
|
child: CheckboxListTile(
|
||||||
|
value: isPatientSelected,
|
||||||
|
activeColor: Color(0xFFD02127),
|
||||||
|
checkColor: Colors.white,
|
||||||
|
controlAffinity: ListTileControlAffinity.leading,
|
||||||
|
side: MaterialStateBorderSide.resolveWith(
|
||||||
|
(Set<MaterialState> states) {
|
||||||
|
if (states.contains(MaterialState.selected)) {
|
||||||
|
return const BorderSide(color: Color(0xFFD02127));
|
||||||
|
}
|
||||||
|
return const BorderSide(color: Color(0xFFE6E6E6));
|
||||||
|
},
|
||||||
|
),
|
||||||
|
shape: RoundedRectangleBorder(
|
||||||
|
borderRadius: BorderRadius.circular(16)),
|
||||||
|
onChanged: (bool? value) {
|
||||||
|
setState(() {
|
||||||
|
isPatientSelected = value ?? false;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
title: AppText(
|
||||||
|
TranslationBase.of(context).patient,
|
||||||
|
color: Color(0XFF575757),
|
||||||
|
fontSize: 14,
|
||||||
|
fontWeight: FontWeight.w400,
|
||||||
|
),
|
||||||
|
contentPadding: EdgeInsets.zero),
|
||||||
|
),
|
||||||
|
|
||||||
|
ListTileTheme(
|
||||||
|
horizontalTitleGap: 0,
|
||||||
|
child: CheckboxListTile(
|
||||||
|
value: isFamilySelected,
|
||||||
|
activeColor: Color(0xFFD02127),
|
||||||
|
checkColor: Colors.white,
|
||||||
|
controlAffinity: ListTileControlAffinity.leading,
|
||||||
|
side: MaterialStateBorderSide.resolveWith(
|
||||||
|
(Set<MaterialState> states) {
|
||||||
|
if (states.contains(MaterialState.selected)) {
|
||||||
|
return const BorderSide(color: Color(0xFFD02127));
|
||||||
|
}
|
||||||
|
return const BorderSide(color: Color(0xFFE6E6E6));
|
||||||
|
},
|
||||||
|
),
|
||||||
|
shape: RoundedRectangleBorder(
|
||||||
|
borderRadius: BorderRadius.circular(16)),
|
||||||
|
onChanged: (bool? value) {
|
||||||
|
setState(() {
|
||||||
|
isFamilySelected = value ?? false;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
title: AppText(
|
||||||
|
TranslationBase.of(context).familySpecify,
|
||||||
|
color: Color(0XFF575757),
|
||||||
|
fontSize: 14,
|
||||||
|
fontWeight: FontWeight.w400,
|
||||||
|
),
|
||||||
|
contentPadding: EdgeInsets.zero),
|
||||||
|
),
|
||||||
|
Visibility(
|
||||||
|
visible: isFamilySelected,
|
||||||
|
child: Column(children: [
|
||||||
|
AppTextFieldCustom(
|
||||||
|
hintText: TranslationBase.of(context).remarks,
|
||||||
|
controller: familyController,
|
||||||
|
inputType: TextInputType.multiline,
|
||||||
|
maxLines: 25,
|
||||||
|
minLines: 3,
|
||||||
|
hasBorder: true,
|
||||||
|
onClick: () {},
|
||||||
|
onChanged: (value) {},
|
||||||
|
onFieldSubmitted: () {},
|
||||||
|
),
|
||||||
|
])),
|
||||||
|
|
||||||
|
ListTileTheme(
|
||||||
|
horizontalTitleGap: 0,
|
||||||
|
child: CheckboxListTile(
|
||||||
|
value: isOtherSelected,
|
||||||
|
activeColor: Color(0xFFD02127),
|
||||||
|
checkColor: Colors.white,
|
||||||
|
controlAffinity: ListTileControlAffinity.leading,
|
||||||
|
side: MaterialStateBorderSide.resolveWith(
|
||||||
|
(Set<MaterialState> states) {
|
||||||
|
if (states.contains(MaterialState.selected)) {
|
||||||
|
return const BorderSide(color: Color(0xFFD02127));
|
||||||
|
}
|
||||||
|
return const BorderSide(color: Color(0xFFE6E6E6));
|
||||||
|
},
|
||||||
|
),
|
||||||
|
shape: RoundedRectangleBorder(
|
||||||
|
borderRadius: BorderRadius.circular(16)),
|
||||||
|
onChanged: (bool? value) {
|
||||||
|
setState(() {
|
||||||
|
isOtherSelected = value ?? false;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
title: AppText(
|
||||||
|
TranslationBase.of(context).otherSpecify,
|
||||||
|
color: Color(0XFF575757),
|
||||||
|
fontSize: 14,
|
||||||
|
fontWeight: FontWeight.w400,
|
||||||
|
),
|
||||||
|
contentPadding: EdgeInsets.zero),
|
||||||
|
),
|
||||||
|
Visibility(
|
||||||
|
visible: isOtherSelected,
|
||||||
|
child: Column(
|
||||||
|
children: [
|
||||||
|
AppTextFieldCustom(
|
||||||
|
hintText: TranslationBase.of(context).remarks,
|
||||||
|
controller: otherController,
|
||||||
|
inputType: TextInputType.multiline,
|
||||||
|
maxLines: 25,
|
||||||
|
minLines: 3,
|
||||||
|
hasBorder: true,
|
||||||
|
onClick: () {},
|
||||||
|
onChanged: (value) {},
|
||||||
|
onFieldSubmitted: () {},
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
|
||||||
|
Divider(),
|
||||||
|
SizedBox(
|
||||||
|
height: 8,
|
||||||
|
),
|
||||||
|
AppText(
|
||||||
|
TranslationBase.of(context).historyOfIllness,
|
||||||
|
fontSize: 14,
|
||||||
|
fontWeight: FontWeight.w600,
|
||||||
|
textAlign: TextAlign.start,
|
||||||
|
color: Colors.black,
|
||||||
|
),
|
||||||
|
SizedBox(
|
||||||
|
height: 8,
|
||||||
|
),
|
||||||
|
AppTextFieldCustom(
|
||||||
|
hintText: TranslationBase.of(context).remarks,
|
||||||
|
controller: otherController,
|
||||||
|
inputType: TextInputType.multiline,
|
||||||
|
maxLines: 25,
|
||||||
|
minLines: 3,
|
||||||
|
hasBorder: true,
|
||||||
|
onClick: () {},
|
||||||
|
onChanged: (value) {},
|
||||||
|
onFieldSubmitted: () {},
|
||||||
|
),
|
||||||
|
SizedBox(
|
||||||
|
height: 8,
|
||||||
|
),
|
||||||
|
AppText(
|
||||||
|
'Last saved: 22-10-2024 08:07 am [3 hours ago]',
|
||||||
|
fontSize: 10,
|
||||||
|
fontWeight: FontWeight.normal,
|
||||||
|
textAlign: TextAlign.start,
|
||||||
|
color: Color(0XFF575757),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
Loading…
Reference in New Issue