Skip to content

QueueSignalMixin

QueueSignalMixin is a mixin for a Signal that adds reactive methods for Queue.

class MySignal extends Signal<Queue<int>> with QueueSignalMixin<int> {
MySignal(Queue<int> value) : super(value);
}
void main() {
final q = Queue<int>();
a.addFirst(1);
final signal = MySignal(q);
effect(() {
print(signal.length);
});
signal.addLast(4);
}