previousInList method

  1. @override
Step? previousInList(
  1. Step step
)
override

Implementation

@override
Step? previousInList(Step step) {
  final currentIndex = task.steps
      .indexWhere((element) => element.stepIdentifier == step.stepIdentifier);
  return (currentIndex - 1 < 0) ? null : task.steps[currentIndex - 1];
}