contains<S> method

bool contains<S>()

Checks whether a state of S type was registered before.

Throws StateError if StateNotifier was disposed.

Implementation

bool contains<S>() {
  if (_disposed) {
    throw StateError("Can't check state - $runtimeType is disposed.");
  }
  return _stateController.containsKey(S);
}