state<T> method

Rx<T> state<T>(
  1. String key,
  2. T initialValue
)

Create or get a mock Rx state

Implementation

Rx<T> state<T>(String key, T initialValue) {
  if (!_state.containsKey(key)) {
    _state[key] = Rx<T>(initialValue);
  }
  return _state[key] as Rx<T>;
}