again removing

This commit is contained in:
2025-06-02 11:04:25 +02:00
parent d0ebb5989e
commit 9aa9aca4cf

View File

@@ -42,18 +42,6 @@ class _MihPatientSearchState extends State<MihPatientSearch> {
Widget getPatientSearch(double width) {
return MihSingleChildScroll(
child: KeyboardListener(
focusNode: _focusNode,
autofocus: true,
onKeyEvent: (event) async {
if (event is KeyDownEvent &&
event.logicalKey == LogicalKeyboardKey.enter) {
// submitPatientForm();
submitPatientSearch();
//To-Do: Implement the search function
// print("To-Do: Implement the search function");
}
},
child: Column(mainAxisSize: MainAxisSize.max, children: [
Padding(
padding: EdgeInsets.symmetric(horizontal: width / 20),
@@ -61,12 +49,10 @@ class _MihPatientSearchState extends State<MihPatientSearch> {
controller: _mihPatientSearchController,
hintText: "Search Patient ID/ Aid No.",
prefixIcon: Icons.search,
fillColor:
MzanziInnovationHub.of(context)!.theme.secondaryColor(),
fillColor: MzanziInnovationHub.of(context)!.theme.secondaryColor(),
hintColor: MzanziInnovationHub.of(context)!.theme.primaryColor(),
onPrefixIconTap: () {
submitPatientSearch();
print("Search Text: ${_mihPatientSearchController.text}");
},
onClearIconTap: () {
setState(() {
@@ -98,17 +84,15 @@ class _MihPatientSearchState extends State<MihPatientSearch> {
snapshot.data!, _mihPatientSearchString);
//print(patientsList);
}
return displayPatientList(
patientsList, _mihPatientSearchString);
return displayPatientList(patientsList, _mihPatientSearchString);
} else {
return Center(
child: Text(
"Error pulling Patients Data\n$baseUrl/patients/search/$_mihPatientSearchString",
style: TextStyle(
fontSize: 25,
color: MzanziInnovationHub.of(context)!
.theme
.errorColor()),
color:
MzanziInnovationHub.of(context)!.theme.errorColor()),
textAlign: TextAlign.center,
),
);
@@ -116,7 +100,6 @@ class _MihPatientSearchState extends State<MihPatientSearch> {
},
),
]),
),
);
}