stop user from submitting blank
This commit is contained in:
parent
444ad269ae
commit
b9a8adb59f
1 changed files with 14 additions and 4 deletions
|
|
@ -9,6 +9,7 @@ import 'package:patient_manager/components/buildPatientQueueList.dart';
|
|||
import 'package:patient_manager/components/mihAppBar.dart';
|
||||
import 'package:patient_manager/components/mihLoadingCircle.dart';
|
||||
import 'package:patient_manager/components/myDateInput.dart';
|
||||
import 'package:patient_manager/components/myErrorMessage.dart';
|
||||
import 'package:patient_manager/objects/arguments.dart';
|
||||
import 'package:patient_manager/objects/patientQueue.dart';
|
||||
import 'package:supertokens_flutter/http.dart' as http;
|
||||
|
|
@ -373,10 +374,19 @@ class _PatientManagerState extends State<PatientManager> {
|
|||
}
|
||||
|
||||
void submitPatientForm() {
|
||||
setState(() {
|
||||
searchString = searchController.text;
|
||||
patientSearchResults = fetchPatients(searchString);
|
||||
});
|
||||
if (searchController.text != "") {
|
||||
setState(() {
|
||||
searchString = searchController.text;
|
||||
patientSearchResults = fetchPatients(searchString);
|
||||
});
|
||||
} else {
|
||||
showDialog(
|
||||
context: context,
|
||||
builder: (context) {
|
||||
return const MyErrorMessage(errorType: "Input Error");
|
||||
},
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
void checkforchange() {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue