nextInList method
Implementation
Step? nextInList(Step? step) {
final currentIndex = task.steps.indexWhere(
(element) => element.id == step?.id,
);
return (currentIndex + 1 > task.steps.length - 1)
? null
: task.steps[currentIndex + 1];
}