addAuthStateChangedCallback method

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

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