upsertAction method

void upsertAction(
  1. List<Page> actionFunc(
    1. List<Page>
    ),
  2. dynamic actionKey
)

Implementation

void upsertAction(
    List<Page> Function(List<Page>) actionFunc, dynamic actionKey) {
  if (actions!.containsKey(actionKey)) {
    actions!.update(actionKey, (_) => actionFunc);
    return;
  }
  actions![actionKey] = actionFunc;
  _afterAction();
}