You can try this
if (_registerFormKey.currentState!.validate()) {
User? user = await FireAuth.registerUsingEmailPassword(
name: _nameTextController.text,
email: _emailTextController.text,
password:_passwordTextController.text,);
setState(() {
isProcessing = false;
});
if (user != null) {
Navigator.of(context).pushAndRemoveUntil(
MaterialPageRoute(builder: (context) =>
ProfilePage(user: user)),ModalRoute.withName('/'),);
}
} /// add code in this line
/// if use input wrong
/// update UI to show the button again
else {
setState(() {
isProcessing = false;
});
}
CLICK HERE to find out more related problems solutions.