flutter-ddd-firebase-course icon indicating copy to clipboard operation
flutter-ddd-firebase-course copied to clipboard

new firebase_auth 0.18 beaking changes

Open AbdoZDGaia opened this issue 4 years ago • 4 comments

as of update 0.18 there's been changes in the way user state is handled. _firebaseAuth.CurrentUser() is no longer usable, CurrentUser is now just a getter.

/// Returns the current [User] if they are currently signed-in, or null if /// not. /// /// You should not use this getter to determine the users current state, /// instead use [authStateChanges], [idTokenChanges] or [userChanges] to /// subscribe to updates.

can you please, even if you're not willing to update the entire project, just tell me how to handle the "authStateChanges" stream for example through the firebase authentication facade? and pass it down to states and firing events based on how we listen to it.

AbdoZDGaia avatar Sep 05 '20 18:09 AbdoZDGaia

Try this: https://github.com/ResoCoder/flutter-ddd-firebase-course/issues/9#issuecomment-680180625

A1000carZ avatar Sep 08 '20 14:09 A1000carZ

pls has anyone come up with the solution to this?

you must renamethe User class to a different name ex:User--> AppUser and FirebaseUser --> User

becbelk avatar Jul 22 '21 18:07 becbelk

Try this: #9 (comment) @A1000carZ I am getting this error yet:

The argument type 'dynamic' can't be assigned to the parameter type 'AppUser?'.

Can I get some help on this issue? Thanks.

woodsoul507 avatar Aug 21 '21 15:08 woodsoul507