Dark_programmer
Dark_programmer

Reputation: 13

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

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

Second page. Both pages are shown below

Upvotes: 1

Views: 8438

Answers (1)

Jahn E.
Jahn E.

Reputation: 1313

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

Upvotes: 5

Related Questions