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) { Widget getPatientSearch(double width) {
return MihSingleChildScroll( 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: [ child: Column(mainAxisSize: MainAxisSize.max, children: [
Padding( Padding(
padding: EdgeInsets.symmetric(horizontal: width / 20), padding: EdgeInsets.symmetric(horizontal: width / 20),
@@ -61,12 +49,10 @@ class _MihPatientSearchState extends State<MihPatientSearch> {
controller: _mihPatientSearchController, controller: _mihPatientSearchController,
hintText: "Search Patient ID/ Aid No.", hintText: "Search Patient ID/ Aid No.",
prefixIcon: Icons.search, prefixIcon: Icons.search,
fillColor: fillColor: MzanziInnovationHub.of(context)!.theme.secondaryColor(),
MzanziInnovationHub.of(context)!.theme.secondaryColor(),
hintColor: MzanziInnovationHub.of(context)!.theme.primaryColor(), hintColor: MzanziInnovationHub.of(context)!.theme.primaryColor(),
onPrefixIconTap: () { onPrefixIconTap: () {
submitPatientSearch(); submitPatientSearch();
print("Search Text: ${_mihPatientSearchController.text}");
}, },
onClearIconTap: () { onClearIconTap: () {
setState(() { setState(() {
@@ -98,17 +84,15 @@ class _MihPatientSearchState extends State<MihPatientSearch> {
snapshot.data!, _mihPatientSearchString); snapshot.data!, _mihPatientSearchString);
//print(patientsList); //print(patientsList);
} }
return displayPatientList( return displayPatientList(patientsList, _mihPatientSearchString);
patientsList, _mihPatientSearchString);
} else { } else {
return Center( return Center(
child: Text( child: Text(
"Error pulling Patients Data\n$baseUrl/patients/search/$_mihPatientSearchString", "Error pulling Patients Data\n$baseUrl/patients/search/$_mihPatientSearchString",
style: TextStyle( style: TextStyle(
fontSize: 25, fontSize: 25,
color: MzanziInnovationHub.of(context)! color:
.theme MzanziInnovationHub.of(context)!.theme.errorColor()),
.errorColor()),
textAlign: TextAlign.center, textAlign: TextAlign.center,
), ),
); );
@@ -116,7 +100,6 @@ class _MihPatientSearchState extends State<MihPatientSearch> {
}, },
), ),
]), ]),
),
); );
} }