Merge branch 'update_flutter_3.24_vida_plus_episode' of http://34.17.52.180/Haroon6138/doctor_app_flutter into update_flutter_3.24_vida_plus_episode
commit
5f90180fd6
@ -0,0 +1,56 @@
|
|||||||
|
import 'package:doctor_app_flutter/core/viewModel/SOAP_view_model.dart';
|
||||||
|
import 'package:doctor_app_flutter/screens/base/base_view.dart';
|
||||||
|
import 'package:doctor_app_flutter/screens/patients/patient_search/patient_search_header.dart';
|
||||||
|
import 'package:doctor_app_flutter/screens/patients/profile/soap_update_vida_plus/subjective/chief_complaint/widgets/ComplaintSelection.dart';
|
||||||
|
import 'package:doctor_app_flutter/screens/patients/profile/soap_update_vida_plus/subjective/chief_complaint/widgets/previous_cheif_complaints.dart';
|
||||||
|
import 'package:doctor_app_flutter/utils/translations_delegate_base_utils.dart';
|
||||||
|
import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart';
|
||||||
|
import 'package:flutter/material.dart';
|
||||||
|
|
||||||
|
class AddChiefComplaint extends StatelessWidget {
|
||||||
|
final List<String> complaints;
|
||||||
|
final String selectedType;
|
||||||
|
final String? firstField;
|
||||||
|
final String? secondField;
|
||||||
|
final String? thirdField;
|
||||||
|
|
||||||
|
const AddChiefComplaint(
|
||||||
|
{super.key,
|
||||||
|
required this.complaints,
|
||||||
|
required this.selectedType,
|
||||||
|
this.firstField,
|
||||||
|
this.secondField,
|
||||||
|
this.thirdField});
|
||||||
|
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
return BaseView<SOAPViewModel>(
|
||||||
|
builder: (_, model, w) => AppScaffold(
|
||||||
|
isShowAppBar: true,
|
||||||
|
appBar: PatientSearchHeader(
|
||||||
|
title: TranslationBase.of(context).addChiefComplaint
|
||||||
|
),
|
||||||
|
body: Padding(
|
||||||
|
padding: const EdgeInsets.all(20.0),
|
||||||
|
child: SingleChildScrollView(
|
||||||
|
child: Column(
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
|
mainAxisAlignment: MainAxisAlignment.start,
|
||||||
|
children: [
|
||||||
|
ComplaintSelection(
|
||||||
|
complaints: ['option1' ,'option 2'],
|
||||||
|
selectedType: selectedType,
|
||||||
|
firstField: firstField,
|
||||||
|
secondField: secondField,
|
||||||
|
thirdField: thirdField,
|
||||||
|
),
|
||||||
|
SizedBox(height: 16,),
|
||||||
|
PreviousCheifComplaints()
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,266 @@
|
|||||||
|
import 'package:doctor_app_flutter/screens/patients/profile/soap_update_vida_plus/subjective/chief_complaint/widgets/complaint_items.dart';
|
||||||
|
import 'package:doctor_app_flutter/utils/translations_delegate_base_utils.dart';
|
||||||
|
import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart';
|
||||||
|
import 'package:flutter/material.dart';
|
||||||
|
import 'package:hexcolor/hexcolor.dart';
|
||||||
|
|
||||||
|
class ComplaintSelection extends StatefulWidget {
|
||||||
|
final List<String> complaints;
|
||||||
|
final String selectedType;
|
||||||
|
final String? firstField;
|
||||||
|
final String? secondField;
|
||||||
|
final String? thirdField;
|
||||||
|
|
||||||
|
const ComplaintSelection({super.key,
|
||||||
|
required this.complaints,
|
||||||
|
required this.selectedType,
|
||||||
|
this.firstField,
|
||||||
|
this.secondField,
|
||||||
|
this.thirdField});
|
||||||
|
|
||||||
|
@override
|
||||||
|
State<ComplaintSelection> createState() => _ComplaintSelectionState();
|
||||||
|
}
|
||||||
|
|
||||||
|
class _ComplaintSelectionState extends State<ComplaintSelection> {
|
||||||
|
final TextEditingController firstEditingController = TextEditingController();
|
||||||
|
final TextEditingController secondEditingController = TextEditingController();
|
||||||
|
final TextEditingController thirdEditingController = TextEditingController();
|
||||||
|
OverlayEntry? _overlayEntry;
|
||||||
|
|
||||||
|
@override
|
||||||
|
void initState() {
|
||||||
|
super.initState();
|
||||||
|
firstEditingController.text = widget.firstField ?? '';
|
||||||
|
secondEditingController.text = widget.secondField ?? '';
|
||||||
|
thirdEditingController.text = widget.thirdField ?? '';
|
||||||
|
_focus.addListener(_onFocusChange);
|
||||||
|
}
|
||||||
|
|
||||||
|
void _onFocusChange() {
|
||||||
|
removeOverlay();
|
||||||
|
}
|
||||||
|
|
||||||
|
void _showOverlay(BuildContext context) {
|
||||||
|
print("the function is called");
|
||||||
|
|
||||||
|
_overlayEntry?.remove();
|
||||||
|
|
||||||
|
final overlay = Overlay.of(context);
|
||||||
|
final renderBox = context.findRenderObject() as RenderBox;
|
||||||
|
final position = renderBox.localToGlobal(Offset.zero);
|
||||||
|
print(
|
||||||
|
'the position is $position and render box is ${renderBox.size.height}');
|
||||||
|
_overlayEntry = OverlayEntry(
|
||||||
|
builder: (context) =>
|
||||||
|
Positioned(
|
||||||
|
left: position.dx,
|
||||||
|
top: position.dy + renderBox.size.height - 12,
|
||||||
|
child: Material(
|
||||||
|
elevation: 4.0,
|
||||||
|
child: Padding(
|
||||||
|
padding: const EdgeInsets.all(8.0),
|
||||||
|
child: Column(
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
|
mainAxisSize: MainAxisSize.max,
|
||||||
|
children: [
|
||||||
|
SizedBox(width: MediaQuery
|
||||||
|
.sizeOf(context)
|
||||||
|
.width - 50, child: Text("Option 1"),)
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
|
||||||
|
overlay?.insert(_overlayEntry!);
|
||||||
|
}
|
||||||
|
|
||||||
|
void removeOverlay() {
|
||||||
|
_overlayEntry?.remove();
|
||||||
|
_overlayEntry = null;
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
return Material(
|
||||||
|
shape: RoundedRectangleBorder(
|
||||||
|
borderRadius: BorderRadius.circular(10),
|
||||||
|
side: BorderSide(
|
||||||
|
width: 1,
|
||||||
|
color: Color(0xFFEFEFEF),
|
||||||
|
)),
|
||||||
|
color: Colors.white,
|
||||||
|
child: Padding(
|
||||||
|
padding: const EdgeInsets.symmetric(horizontal: 16.0, vertical: 12),
|
||||||
|
child: Column(
|
||||||
|
mainAxisAlignment: MainAxisAlignment.start,
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
|
children: [
|
||||||
|
AppText(
|
||||||
|
TranslationBase
|
||||||
|
.of(context)
|
||||||
|
.addChiefComplaint,
|
||||||
|
fontSize: 16,
|
||||||
|
fontWeight: FontWeight.w600,
|
||||||
|
textAlign: TextAlign.start,
|
||||||
|
color: Colors.black,
|
||||||
|
),
|
||||||
|
ListTileTheme(
|
||||||
|
horizontalTitleGap: 0,
|
||||||
|
child: CheckboxListTile(
|
||||||
|
value: true,
|
||||||
|
enabled: false,
|
||||||
|
checkColor: Colors.white,
|
||||||
|
activeColor: Color(0xFFD02127),
|
||||||
|
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)),
|
||||||
|
controlAffinity: ListTileControlAffinity.leading,
|
||||||
|
onChanged: (bool? value) {},
|
||||||
|
title: AppText(
|
||||||
|
TranslationBase
|
||||||
|
.of(context)
|
||||||
|
.addChiefComplaint,
|
||||||
|
color: Color(0XFF575757),
|
||||||
|
fontSize: 14,
|
||||||
|
fontWeight: FontWeight.w400,
|
||||||
|
),
|
||||||
|
contentPadding: EdgeInsets.zero),
|
||||||
|
),
|
||||||
|
ListTileTheme(
|
||||||
|
horizontalTitleGap: 0,
|
||||||
|
child: CheckboxListTile(
|
||||||
|
value: true,
|
||||||
|
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) {},
|
||||||
|
title: AppText(
|
||||||
|
TranslationBase
|
||||||
|
.of(context)
|
||||||
|
.generalList,
|
||||||
|
color: Color(0XFF575757),
|
||||||
|
fontSize: 14,
|
||||||
|
fontWeight: FontWeight.w400,
|
||||||
|
),
|
||||||
|
contentPadding: EdgeInsets.zero),
|
||||||
|
),
|
||||||
|
ListTileTheme(
|
||||||
|
horizontalTitleGap: 0,
|
||||||
|
child: CheckboxListTile(
|
||||||
|
activeColor: Color(0xFFD02127),
|
||||||
|
checkColor: Colors.white,
|
||||||
|
contentPadding: EdgeInsets.zero,
|
||||||
|
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)),
|
||||||
|
value: false,
|
||||||
|
controlAffinity: ListTileControlAffinity.leading,
|
||||||
|
onChanged: (bool? value) {},
|
||||||
|
title: AppText(
|
||||||
|
TranslationBase
|
||||||
|
.of(context)
|
||||||
|
.specialList,
|
||||||
|
color: Color(0XFF575757),
|
||||||
|
fontSize: 14,
|
||||||
|
fontWeight: FontWeight.w400,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
TextWithSelectedItems()
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
FocusNode _focus = FocusNode();
|
||||||
|
|
||||||
|
Widget TextWithSelectedItems() {
|
||||||
|
return Material(
|
||||||
|
shape: RoundedRectangleBorder(
|
||||||
|
borderRadius: BorderRadius.circular(10),
|
||||||
|
side: BorderSide(
|
||||||
|
width: 1,
|
||||||
|
color: Color(0xFFEFEFEF),
|
||||||
|
)),
|
||||||
|
color: Colors.white,
|
||||||
|
child: Column(
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
|
children: [
|
||||||
|
SizedBox(height: 8,),
|
||||||
|
Padding(
|
||||||
|
padding: const EdgeInsets.only(left: 8.0),
|
||||||
|
child: AppText(TranslationBase
|
||||||
|
.of(context)
|
||||||
|
.enterChiefCompliants,
|
||||||
|
fontWeight: FontWeight.w600,
|
||||||
|
fontSize: 11,
|
||||||
|
textAlign: TextAlign.start,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
SizedBox(height: 8,),
|
||||||
|
SizedBox(
|
||||||
|
height: 43,
|
||||||
|
child: Row(
|
||||||
|
children: [
|
||||||
|
Expanded(
|
||||||
|
child: ListView.builder(scrollDirection: Axis.horizontal,
|
||||||
|
itemCount: widget.complaints.length + 1,
|
||||||
|
itemBuilder: (context, index) {
|
||||||
|
if (index == widget.complaints.length) {
|
||||||
|
return SizedBox(
|
||||||
|
width: MediaQuery
|
||||||
|
.sizeOf(context)
|
||||||
|
.width,
|
||||||
|
child: TextField(
|
||||||
|
decoration: InputDecoration.collapsed(
|
||||||
|
hintText: '',
|
||||||
|
),
|
||||||
|
onChanged: (value) {
|
||||||
|
|
||||||
|
},),
|
||||||
|
);
|
||||||
|
} else {
|
||||||
|
return ComplaintItems(
|
||||||
|
complaint: widget.complaints[index],
|
||||||
|
onCrossClicked: (complaints) {});
|
||||||
|
}
|
||||||
|
}),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
SizedBox(height: 8,),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -1,27 +1,47 @@
|
|||||||
import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart';
|
import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
|
|
||||||
class ComplaintItems extends StatelessWidget{
|
class ComplaintItems extends StatelessWidget {
|
||||||
final String complaint;
|
final String complaint;
|
||||||
final Function(String) onCrossClicked;
|
final Function(String) onCrossClicked;
|
||||||
|
|
||||||
const ComplaintItems({super.key, required this.complaint, required this.onCrossClicked});
|
const ComplaintItems(
|
||||||
|
{super.key, required this.complaint, required this.onCrossClicked});
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return ListTile(
|
return Padding(
|
||||||
title: AppText(complaint,fontWeight: FontWeight.w400, fontSize: 14,color: Color(0xFF575757),),
|
padding: const EdgeInsets.all(8.0),
|
||||||
|
child: Material(
|
||||||
|
color: Color(0XAAA5A5A5),
|
||||||
|
shape: RoundedRectangleBorder(
|
||||||
|
borderRadius: BorderRadius.circular(5),),
|
||||||
|
child: Row(
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.center,
|
||||||
|
children: [
|
||||||
|
SizedBox(width: 6,),
|
||||||
|
AppText(
|
||||||
|
complaint,
|
||||||
|
fontWeight: FontWeight.w400,
|
||||||
|
fontSize: 14,
|
||||||
|
color: Color(0xFF575757),
|
||||||
|
),
|
||||||
|
SizedBox(width: 8,),
|
||||||
|
InkWell(
|
||||||
|
onTap: () {
|
||||||
|
onCrossClicked(complaint);
|
||||||
|
},
|
||||||
|
child: Icon(
|
||||||
|
Icons.close,
|
||||||
|
size: 16,
|
||||||
|
color: Color(0xFFD02127),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
SizedBox(width: 4,),
|
||||||
|
|
||||||
trailing: IconButton(
|
],
|
||||||
onPressed: (){
|
|
||||||
onCrossClicked(complaint);
|
|
||||||
},
|
|
||||||
icon: Icon(
|
|
||||||
Icons.close,
|
|
||||||
color: Color(0xFFD02127),
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -0,0 +1,104 @@
|
|||||||
|
import 'package:flutter/material.dart';
|
||||||
|
|
||||||
|
import '../../../../../../../utils/translations_delegate_base_utils.dart';
|
||||||
|
import '../../../../../../../widgets/shared/app_texts_widget.dart';
|
||||||
|
import '../../../../../../../widgets/shared/buttons/app_buttons_widget.dart';
|
||||||
|
|
||||||
|
class ListOfComplaintsItem extends StatelessWidget {
|
||||||
|
final String name;
|
||||||
|
final String createdBy;
|
||||||
|
final String createdAt;
|
||||||
|
final VoidCallback onSendClick;
|
||||||
|
|
||||||
|
const ListOfComplaintsItem(
|
||||||
|
{super.key,
|
||||||
|
required this.name,
|
||||||
|
required this.createdBy,
|
||||||
|
required this.createdAt,
|
||||||
|
required this.onSendClick});
|
||||||
|
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
return Column(
|
||||||
|
mainAxisSize: MainAxisSize.min,
|
||||||
|
children: [
|
||||||
|
Row(
|
||||||
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||||
|
children: [
|
||||||
|
Column(
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
|
children: [
|
||||||
|
AppText(
|
||||||
|
name,
|
||||||
|
fontWeight: FontWeight.w600,
|
||||||
|
fontSize: 16,
|
||||||
|
textAlign: TextAlign.start,
|
||||||
|
color: Color(0xFF2E303A),
|
||||||
|
),
|
||||||
|
SizedBox(
|
||||||
|
height: 4,
|
||||||
|
),
|
||||||
|
Row(
|
||||||
|
children: [
|
||||||
|
AppText(
|
||||||
|
TranslationBase.of(context).createdBy,
|
||||||
|
fontWeight: FontWeight.w400,
|
||||||
|
fontSize: 15,
|
||||||
|
color: Color(0xFF2E303A),
|
||||||
|
textAlign: TextAlign.start,
|
||||||
|
),
|
||||||
|
SizedBox(
|
||||||
|
width: 4,
|
||||||
|
),
|
||||||
|
AppText(
|
||||||
|
createdBy,
|
||||||
|
fontWeight: FontWeight.w400,
|
||||||
|
fontSize: 15,
|
||||||
|
textAlign: TextAlign.start,
|
||||||
|
color: Color(0xFF2E303A),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
Row(
|
||||||
|
children: [
|
||||||
|
AppText(
|
||||||
|
TranslationBase.of(context).createdOn,
|
||||||
|
fontWeight: FontWeight.w400,
|
||||||
|
textAlign: TextAlign.start,
|
||||||
|
fontSize: 15,
|
||||||
|
color: Color(0xFF2E303A),
|
||||||
|
),
|
||||||
|
SizedBox(
|
||||||
|
width: 4,
|
||||||
|
),
|
||||||
|
AppText(
|
||||||
|
createdAt,
|
||||||
|
fontWeight: FontWeight.w400,
|
||||||
|
textAlign: TextAlign.start,
|
||||||
|
fontSize: 15,
|
||||||
|
color: Color(0xFF2E303A),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
)
|
||||||
|
],
|
||||||
|
),
|
||||||
|
|
||||||
|
SizedBox(
|
||||||
|
width: 77,
|
||||||
|
height: 27,
|
||||||
|
child: AppButton(
|
||||||
|
title: TranslationBase.of(context).select,
|
||||||
|
hPadding: 8,
|
||||||
|
color: Color(0xFFD02127),
|
||||||
|
fontColor: Colors.white,
|
||||||
|
onPressed: () {
|
||||||
|
onSendClick();
|
||||||
|
},
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
],
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,62 @@
|
|||||||
|
import 'package:doctor_app_flutter/screens/patients/profile/soap_update_vida_plus/subjective/chief_complaint/widgets/listOfComplaints.dart';
|
||||||
|
import 'package:doctor_app_flutter/utils/translations_delegate_base_utils.dart';
|
||||||
|
import 'package:flutter/material.dart';
|
||||||
|
|
||||||
|
import '../../../../../../../widgets/shared/app_texts_widget.dart';
|
||||||
|
|
||||||
|
class PreviousCheifComplaints extends StatelessWidget {
|
||||||
|
const PreviousCheifComplaints({super.key});
|
||||||
|
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
return Material(
|
||||||
|
shape: RoundedRectangleBorder(
|
||||||
|
borderRadius: BorderRadius.circular(10),
|
||||||
|
side: BorderSide(
|
||||||
|
width: 1,
|
||||||
|
color: Color(0xFFEFEFEF),
|
||||||
|
)),
|
||||||
|
color: Colors.white,
|
||||||
|
child: Padding(
|
||||||
|
padding: const EdgeInsets.symmetric(horizontal: 16.0, vertical: 12),
|
||||||
|
child: Column(
|
||||||
|
mainAxisSize: MainAxisSize.min,
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
|
children: [
|
||||||
|
AppText(
|
||||||
|
TranslationBase.of(context).previousChiefCompaints,
|
||||||
|
textAlign: TextAlign.start,
|
||||||
|
fontWeight: FontWeight.w600,
|
||||||
|
fontSize: 16,
|
||||||
|
color: Color(0xFF2E303A),
|
||||||
|
),
|
||||||
|
SizedBox(
|
||||||
|
height: 16,
|
||||||
|
),
|
||||||
|
AppText(
|
||||||
|
TranslationBase.of(context).listOfActiveEpisodes,
|
||||||
|
fontWeight: FontWeight.w400,
|
||||||
|
fontSize: 14,
|
||||||
|
textAlign: TextAlign.start,
|
||||||
|
color: Color(0xFF575757),
|
||||||
|
),
|
||||||
|
SizedBox(
|
||||||
|
height: 16,
|
||||||
|
),
|
||||||
|
Flexible(
|
||||||
|
child: ListView.separated(
|
||||||
|
shrinkWrap: true,
|
||||||
|
itemCount: 2,
|
||||||
|
separatorBuilder: (context, index) => Divider(),
|
||||||
|
itemBuilder: (context, index) {
|
||||||
|
return ListOfComplaintsItem(
|
||||||
|
name: "name",
|
||||||
|
createdBy: "createdBy",
|
||||||
|
createdAt: "createdAt",
|
||||||
|
onSendClick: () {});
|
||||||
|
}))
|
||||||
|
],
|
||||||
|
),
|
||||||
|
));
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -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),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue