Flutter Error: Instance member 'user' can't be accessed using static access

Issue

I/m facing this issue. Can anyone assist?
Thanks
First page

Second page. Both pages are shown below

Solution

In order to access a member via static access it needs to be marked as static like so:

static final myStaticFinalVariable;

Alternatively, you must instantiate the class first by creating an instance () to call an instance method.

AuthService().user

Answered By – Jahn E.

Answer Checked By – Timothy Miller (FlutterFixes Admin)

Leave a Reply

Your email address will not be published. Required fields are marked *