register method

  1. @override
void register(
  1. List<MineralStateContract> mineralStates
)

Implementation

@override
void register (List<MineralStateContract> mineralStates) {
  for (final store in List<MineralState>.from(mineralStates)) {
    if (_states.containsKey(store.runtimeType)) {
      throw AlreadyExistException('A shared state named ${store.name} already exists.');
    }

    _states.putIfAbsent(store.runtimeType, () => store);
  }
}