registerChangeCallback method

  1. @override
Disposable? registerChangeCallback(
  1. void callback(
    1. Object? state
    ), [
  2. Object? state
])
override

Registers for a callback that will be invoked when the entry has changed.

Implementation

@override
Disposable? registerChangeCallback(void Function(Object? state) callback,
        [Object? state]) =>
    token.register(
      (state) {
        try {
          callback(state);
        } catch (e) {
          _activeChangeCallbacks = false;
        }
      },
    );