setResult method

void setResult(
  1. dynamic value
)

Sets current effect result

Effect must have a result argument. current effect result value will be set as value.

Implementation

void setResult(dynamic value) {
  if (current == null) {
    throw Exception('Effect can not be null');
  } else if (!(current is EffectWithResult)) {
    throw Exception('Effect can not return a value');
  } else if (current.result == null) {
    throw Exception('Effect has no result argument assigned');
  }

  _effectResults[_currentStep] = value;
  current.result.value = value;
}