unregisterState<State> method

void unregisterState<State>()

Implementation

void unregisterState<State>() {
  if (_subscriptions.containsKey(State)) {
    dispatch(UnregisterStateAction('$State'));
    _subscriptions[State]?.cancel();
    _subscriptions.remove(State);
    final newState = _newState();
    newState.remove(State);
    _store.add(newState);
  }
}