Here's the Button code
ButtonWidget(
text: 'Submit',
onClicked: () {
Navigator.pushAndRemoveUntil(
context, MaterialPageRoute(builder: (_) => SPAL()),
(Route<dynamic> route) => false,
);
print('Email: ${emailController.text}');
print('Password: ${password}');
},
),
How i can make the button check if the email and password is empty or not, if it is then button wont open next page but if it was filled then the button will open the next Screen