WD: Flutter errors removed and parent widget issue resolved

update_flutter_3.24_vida_plus_episode_MDS
taha.alam 11 months ago
parent 48f67dc532
commit 5da6083c91

@ -113,8 +113,7 @@ class _EnterDiagnosisState extends State<EnterDiagnosis> {
},
),
),
Positioned(
child: Material(
Material(
elevation: 4.0, // Optional: for shadow effect
child: ConstrainedBox(
constraints: BoxConstraints(minHeight: 0, maxHeight: 300),
@ -144,7 +143,6 @@ class _EnterDiagnosisState extends State<EnterDiagnosis> {
),
),
),
),
SizedBox(
height: 8,
),

@ -104,7 +104,8 @@ class _AddChiefComplaintState extends State<AddChiefComplaint> {
});
}
episodeByChiefComplaint(SOAPViewModel model) async{
await model.episodeByChiefComplaint(widget.patientInfo);
WidgetsBinding.instance.addPostFrameCallback((_) async{
await model.episodeByChiefComplaint(widget.patientInfo);});
}
createCCByEpisode(model, List<PatientPomrs> chiefComplaint) async{

@ -281,8 +281,9 @@ class _ComplaintSelectionState extends State<ComplaintSelection> {
),)
],),
Stack(children: [
Positioned(child:Material(
Padding(
padding: const EdgeInsets.all(8.0),
child: Material(
elevation: 4.0, // Optional: for shadow effect
child:
ConstrainedBox(
@ -304,7 +305,8 @@ class _ComplaintSelectionState extends State<ComplaintSelection> {
widget.onSave!(cc!);
searchController.text ='';
}));
}))))]),
}))),
),
SizedBox(
height: 43,

@ -44,11 +44,7 @@ class _ComplaintItemsState extends State<ComplaintItems> {
textAlign: TextAlign.center,
),
),
widget.isDeletable ? Positioned(
top:0,
bottom: 0,
right: 10,
child: InkWell(
widget.isDeletable ? InkWell(
onTap: () {
widget.onCrossClicked(widget.complaint);
},
@ -57,7 +53,6 @@ class _ComplaintItemsState extends State<ComplaintItems> {
size: 18,
color: Color(0xFFD02127),
),
),
) :SizedBox()
],),
);

@ -17,6 +17,7 @@ import 'add_medication.dart';
class UpdateMedicationWidget extends StatefulWidget {
final PatiantInformtion patientInfo;
UpdateMedicationWidget({
Key? key,
required this.patientInfo,
@ -33,27 +34,20 @@ class _UpdateMedicationWidgetState extends State<UpdateMedicationWidget> {
Widget build(BuildContext context) {
return BaseView<SOAPViewModel>(
onModelReady: (model) async {
WidgetsBinding.instance.addPostFrameCallback((_) {
model.getHomeMedication(widget.patientInfo);
});
},
builder: (_, model, w) =>
Column(
children: [
builder: (_, model, w) => Column(children: [
AddSoapItem(
title: "${TranslationBase
.of(context)
.addMedication}",
title: "${TranslationBase.of(context).addMedication}",
onAddSoapItemClicked: () {
Navigator.push(
context,
FadePage(
page: AddMedication(
patientInfo: widget.patientInfo,
addMedicationFun:(){
}
)
));
addMedicationFun: () {})));
// openMedicationList(context);
},
),
@ -75,14 +69,9 @@ class _UpdateMedicationWidgetState extends State<UpdateMedicationWidget> {
height: 18,
color: Color(0xffD02127),
),
label: AppText(
TranslationBase.of(context)
.remove,
fontSize: 12,
color: Color(0xffD02127))),
title:
AppText(
label: AppText(TranslationBase.of(context).remove,
fontSize: 12, color: Color(0xffD02127))),
title: AppText(
medication.prescribedItemName!,
fontSize: 12,
fontWeight: FontWeight.w800,
@ -91,16 +80,14 @@ class _UpdateMedicationWidgetState extends State<UpdateMedicationWidget> {
subtitle: AppText(
'${medication.doseQuantity!} - ${medication.frequencyString!}',
fontSize: 10,
),
);
}).toList()),
]
));
]));
}
removeMedication(GetHomeMedicationList medication, SOAPViewModel model) async{
removeMedication(
GetHomeMedicationList medication, SOAPViewModel model) async {
GifLoaderDialogUtils.showMyDialog(context);
await model.removeCurrentMedication(medication.id!);
await model.getHomeMedication(widget.patientInfo);

Loading…
Cancel
Save