1
votes

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

1
Welcome to SO! Could you pleas provide your code so far?CarlosSR

1 Answers

1
votes

You can call showDialog method inside catch

  catch (e) {
          print(e);
          showDialog(
          context: context,
          builder: (context) {
            return AlertDialog(
            // set your custom alert dialog here 
            );
          });
  }