subscribeToRM method Null safety

VoidCallback subscribeToRM(
  1. void fn(
    1. SnapState<T>? snap
    )
)
inherited

Subscribe to the state

Implementation

VoidCallback subscribeToRM(void Function(SnapState<T>? snap) fn) {
  _reactiveModelState.listeners._sideEffectListeners.add(fn);
  return () =>
      () => _reactiveModelState.listeners._sideEffectListeners.remove(fn);
}