void createUser(String email, String password) async {
try {
await _auth
.createUserWithEmailAndPassword(email: email, password: password)
.then((value) => Get.offAll(Home()));
} catch (e) {
Get.snackbar("Error while creating account", e.message, //Error on e.message
snackPosition: SnackPosition.BOTTOM);
}
}
Error: The getter 'message' isn't defined for the class 'Object'. Try correcting the name to the name of an existing getter, or defining a getter or field named 'message'.
Any idea why it is not working?