listSteps method

  1. @override
Future<List<WorkflowStepEntry>> listSteps(
  1. String runId
)
override

Lists stored step entries for a run.

Implementation

@override
/// Lists stored step entries for a run.
Future<List<WorkflowStepEntry>> listSteps(String runId) async {
  final steps = _steps[runId];
  if (steps == null) return const [];
  final entries = <WorkflowStepEntry>[];
  var index = 0;
  for (final entry in steps.entries) {
    entries.add(
      WorkflowStepEntry(name: entry.key, value: entry.value, position: index),
    );
    index += 1;
  }
  return entries;
}