queue static method

void queue(
  1. VoidCallback callback
)

Queues a callback to be executed after the action completes.

If not in an action, the callback is executed immediately.

Implementation

static void queue(VoidCallback callback) {
  if (_isInAction) {
    _queue.add(callback);
  } else {
    callback();
  }
}