force a search for patient
This commit is contained in:
@@ -49,26 +49,25 @@ class _PatientManagerState extends State<PatientManager> {
|
|||||||
.toList();
|
.toList();
|
||||||
}
|
}
|
||||||
|
|
||||||
// Widget displayList(List<Patient> patientsList, String searchString) {
|
Widget displayList(List<Patient> patientsList, String searchString) {
|
||||||
// if (searchString.isNotEmpty && searchString != "") {
|
if (searchString.isNotEmpty && searchString != "") {
|
||||||
// return BuildPatientsList(
|
return BuildPatientsList(
|
||||||
// patients: patientsList,
|
patients: patientsList,
|
||||||
// searchString: searchString,
|
searchString: searchString,
|
||||||
// );
|
);
|
||||||
// }
|
}
|
||||||
// return const Center(
|
return const Center(
|
||||||
// child: Text(
|
child: Text(
|
||||||
// "Please search for a Patient.",
|
"Please search for a Patient.",
|
||||||
// style: TextStyle(fontSize: 25, color: Colors.grey),
|
style: TextStyle(fontSize: 25, color: Colors.grey),
|
||||||
// textAlign: TextAlign.center,
|
textAlign: TextAlign.center,
|
||||||
// ),
|
),
|
||||||
// );
|
);
|
||||||
// }
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
void initState() {
|
void initState() {
|
||||||
futurePatients = fetchPatients(endpoint + widget.userEmail);
|
futurePatients = fetchPatients(endpoint + widget.userEmail);
|
||||||
//displayWidget = displayList(tempList, searchString);
|
|
||||||
super.initState();
|
super.initState();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -116,7 +115,6 @@ class _PatientManagerState extends State<PatientManager> {
|
|||||||
),
|
),
|
||||||
//spacer
|
//spacer
|
||||||
const SizedBox(height: 10),
|
const SizedBox(height: 10),
|
||||||
//Expanded(child: displayWidget),
|
|
||||||
FutureBuilder(
|
FutureBuilder(
|
||||||
future: futurePatients,
|
future: futurePatients,
|
||||||
builder: (context, snapshot) {
|
builder: (context, snapshot) {
|
||||||
@@ -124,7 +122,6 @@ class _PatientManagerState extends State<PatientManager> {
|
|||||||
return const Center(child: CircularProgressIndicator());
|
return const Center(child: CircularProgressIndicator());
|
||||||
} else if (snapshot.hasData) {
|
} else if (snapshot.hasData) {
|
||||||
List<Patient> patientsList;
|
List<Patient> patientsList;
|
||||||
//print(patientsList);
|
|
||||||
if (searchString == "") {
|
if (searchString == "") {
|
||||||
patientsList = snapshot.data!;
|
patientsList = snapshot.data!;
|
||||||
} else {
|
} else {
|
||||||
@@ -133,10 +130,7 @@ class _PatientManagerState extends State<PatientManager> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
return Expanded(
|
return Expanded(
|
||||||
child: BuildPatientsList(
|
child: displayList(patientsList, searchString),
|
||||||
patients: patientsList,
|
|
||||||
searchString: searchString,
|
|
||||||
),
|
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
return const PatManAppDrawer(
|
return const PatManAppDrawer(
|
||||||
|
|||||||
Reference in New Issue
Block a user