I am creating an app where you should register to go to the next page. I want to check if both of text field is not empty then go to next page
if (nameController.text.isEmpty) {
_validateName = true;
} else {
_validateName = false;
}
if (jobController.text.isEmpty) {
_validateJob = true;
} else {
_validateJob = false;
}
I want to check if these two are false then go to the next page
if (_validateJob == false || _validateName == false) {
Navigator.push(
context,
MaterialPageRoute(
builder: (context) {
return GetUser();
},
),
);
}
Aucun commentaire:
Enregistrer un commentaire