setData method

void setData(
  1. T value
)

Change the stored value of the current Atom

Implementation

void setData(T value) {
  final currentResult = _stateStore.evaluateResult(_atom).evaluatorResult;
  currentResult.value = value;

  if (_atom.effects != null) {
    _atom.effects!.map((e) => e).forEach((effect) => effect(currentResult.value, currentResult));
  }
}