Merge pull request #5 from yaso-meth/my-patient-list-refresh-icon

add refresh icon to my patient list to check for updates
This commit is contained in:
yaso-meth
2024-11-19 11:22:32 +02:00
committed by GitHub

View File

@@ -165,6 +165,13 @@ class _PatientManagerState extends State<PatientManager> {
checkforchange(); checkforchange();
} }
void refreshAccessList() {
setState(() {
patientAccessResults = MIHApiCalls.getPatientAccessListOfBusiness(
widget.arguments.business!.business_id);
});
}
void checkforchange() { void checkforchange() {
if (start == true) { if (start == true) {
setState(() { setState(() {
@@ -388,9 +395,23 @@ class _PatientManagerState extends State<PatientManager> {
} }
}, },
child: Column(mainAxisSize: MainAxisSize.max, children: [ child: Column(mainAxisSize: MainAxisSize.max, children: [
const Text( Row(
"My Patient List", mainAxisAlignment: MainAxisAlignment.center,
style: TextStyle(fontSize: 25, fontWeight: FontWeight.bold), children: [
const Text(
"My Patient List",
style: TextStyle(fontSize: 25, fontWeight: FontWeight.bold),
),
IconButton(
iconSize: 20,
icon: const Icon(
Icons.refresh,
),
onPressed: () {
refreshAccessList();
},
),
],
), ),
Divider(color: MzanziInnovationHub.of(context)!.theme.secondaryColor()), Divider(color: MzanziInnovationHub.of(context)!.theme.secondaryColor()),