Reputation: 11
How to display a custom alert dialog based on an error message from Firebase Auth in Flutter. Let's say if a user submitted incorrect email or password or even user's email already registered on firebase then it will pop up an alert dialog based on it's error. Thank you in advanced
Upvotes: 1
Views: 811
Reputation: 506
You can call showDialog
method inside catch
catch (e) {
print(e);
showDialog(
context: context,
builder: (context) {
return AlertDialog(
// set your custom alert dialog here
);
});
}
Upvotes: 1