performActionAt method

Future<void> performActionAt(
  1. int index
)

Performs a single action.

Implementation

Future<void> performActionAt(int index) async {
  if (index > _actions.length)
    throw Exception(
        'Out of bound exception, the selected index [$index] is greater then the list [${_actions.length}]');
  if (!_doneActions[index]) {
    await _actions[index]
        .performAction(setAsDone: _setActionAsDone, actionIndex: index);
    do {
      await Future.delayed(Duration(milliseconds: 100));
    } while (!_doneActions[index]);
  }
}