currentUser property Null safety

User? currentUser

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.


User? get currentUser {
  if (_delegate.currentUser != null) {
    return User._(this, _delegate.currentUser!);

  return null;