Engine<T> constructor

Engine<T>(
  1. RootState<T> root, {
  2. T? context,
  3. ExecutionStep<T>? step,
})

Creates an engine.

root The RootState. context The data object. step The current step. If unspecified, creates a new, initial step.

Implementation

Engine(RootState<T> root, {T? context, ExecutionStep<T>? step})
    // ignore: prefer_initializing_formals
    : root = root,
      _currentStep = step ?? ExecutionStep(root, context, History(root)) {
  if (step == null) initialize();
}