add method

void add(
  1. K priority,
  2. V value
)

Enqueues value under priority, creating the bucket if needed. Audited: 2026-06-12 11:26 EDT

Implementation

void add(K priority, V value) {
  _queues.putIfAbsent(priority, () => <V>[]).add(value);
}