skip to Main Content

The getter ‘message’ isn’t defined for the type ‘Object’.
Try importing the library that defines ‘message’, correcting the name to the name of an existing getter, or defining a getter or field named ‘message’.

image of the problem

I searched and didn’t find any solution
And I want to help someone

2

Answers


  1. Guess it’s firebase auth. Replace your catch(e) with this
    on FirebaseException catch (e)

    https://prnt.sc/Nx2K2WpsEOI5

    Login or Signup to reply.
  2. I think you have the error object e with another…
    e doesn’t have a defined message attribute hence the error…

    use toString() or interpolate like '$e' to get the value of exception caught.

    Also, please copy paste your code to enhance readability in the future.
    Hope it helps!

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search