complete method

  1. @override
void complete(
  1. AppEvent event, {
  2. AppEvent? nextEvent,
})
override

Complete a event

Implementation

@override
void complete(AppEvent event, {AppEvent? nextEvent}) {
  // complete the event
  if (_isInProgressEvents.any((e) => e == event)) {
    final newArr = _isInProgressEvents.toList()
      ..removeWhere((e) => e == event);
    _inProgress.add(newArr);
    fire(EventCompletionEvent(event));
  }

  // fire next event if any
  if (nextEvent != null) {
    fire(nextEvent);
  }
}