Skip to content

Commit

Permalink
docs(firebase_auth): Update documentation for currentUser property …
Browse files Browse the repository at this point in the history
…to make expectations clearer. (#7843)

Co-authored-by: Russell Wheatley <russellwheatley85@gmail.com>
  • Loading branch information
keithshep and russellwheatley authored Feb 10, 2022
1 parent e921f8a commit 59bb47c
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,9 @@ class FirebaseAuth extends FirebasePluginPlatform {
/// 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.
/// This getter only provides a snapshot of user state. Applictions that need
/// to react to changes in user state should instead use [authStateChanges],
/// [idTokenChanges] or [userChanges] to subscribe to updates.
User? get currentUser {
if (_delegate.currentUser != null) {
return User._(this, _delegate.currentUser!);
Expand Down

0 comments on commit 59bb47c

Please sign in to comment.