The getter 'AuthStateChanges' isn't defined for the type 'FirebaseAuth'

Viewed 2515

I'm trying to get UserProvider for Firebase Auth but the error says:

The getter 'AuthStateChanges' isn't defined for the type 'FirebaseAuth'.

and

Undefined name '_onStateChanged'.

UserProvider.initialize() : _auth = FirebaseAuth.instance {
_auth.AuthStateChanges.listen(_onStateChanged);}
1 Answers
Related