I have an error with messages, i have seen everyone using it for displaying errors, but I just get an error : The getter 'message' isn't defined for the type 'Object'.
Future<String> logInUserWithEmail(String email, String password) async {
String retVal = 'error';
//code
retVal = 'success';
} catch (e) {
retVal = e.message; //<-- this here shows the error
}
return retVal;
} }
Did they change it recently or, what is the issue?
Use following
retVal = e.toString() ;
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With