addAuthStateChangedCallback method

  1. @override
UnsubscribeDelegate addAuthStateChangedCallback(
  1. AuthStateChangedCallback callback
)

Add a callback that will be invoked when the service's authentication state changes.

The returned function will remove the callback when called.

Implementation

@override
UnsubscribeDelegate addAuthStateChangedCallback(
    AuthStateChangedCallback callback) {
  _authChangedCallbacks.add(callback);
  return () {
    _authChangedCallbacks.removeWhere((element) => element == callback);
  };
}