Please does anyone know how to catch firebase Auth exceptions on flutter and display them?
Note: I am not interested in the console (catcherror((e) print(e))
try {
final newuser = await _auth.createUserWithEmailAndPassword(
email: emailController.text, password: passwordController.text);
// print("Done");
} catch (e) {
print(e);
showDialog(
context: context,
builder: (BuildContext context) {
return AlertDialog(
title: new Text(e.message),
actions: [
FlatButton(
child: new Text("OK"),
onPressed: () {
Navigator.of(context).pop();
},
),
],
);
},
);
}