Home > Mobile >  How can I resolve "The argument type '
How can I resolve "The argument type '

Time:02-01

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

CodePudding user response:

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

https://prnt.sc/Nx2K2WpsEOI5

CodePudding user response:

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!

  • Related