userStateChanges static method

StreamSubscription<User?> userStateChanges(
  1. void setState(
    1. void ()
    )
)

Returns the current User State Changes 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.

Implementation

static StreamSubscription<User?> userStateChanges(
        void Function(void Function()) setState) =>
    _auth.userChanges().listen((event) => setState(() {}));