loadCheckpoints method

  1. @override
Future<List<StepCheckpoint>> loadCheckpoints(
  1. String workflowExecutionId
)
override

Loads all checkpoints for a given workflow execution, ordered by StepCheckpoint.stepIndex ascending.

Implementation

@override
Future<List<StepCheckpoint>> loadCheckpoints(
  String workflowExecutionId,
) async {
  final list = _checkpoints[workflowExecutionId] ?? [];
  return List.unmodifiable(
    list.toList()..sort((a, b) => a.stepIndex.compareTo(b.stepIndex)),
  );
}