authStateChanges method

Stream<User?> authStateChanges()

Provides a stream of authentication state changes.

Streams changes to the signed-in user.

Returns a Stream of User? values.

Example:

auth.authStateChanges().listen((user) {
  if (user != null) print('Signed in');
});

Implementation

Stream<User?> authStateChanges() => controller.stream;