W3cubDocs

/Dart 2

ListQueue<E>.of constructor

ListQueue<E>.of(Iterable<E> elements)

Create a ListQueue from elements.

The elements are added to the queue, as by addLast, in the order given by elements.iterator.

Implementation

factory ListQueue.of(Iterable<E> elements) =>
    ListQueue<E>()..addAll(elements);

© 2012 the Dart project authors
Licensed under the Creative Commons Attribution-ShareAlike License v4.0.
https://api.dart.dev/stable/2.5.0/dart-collection/ListQueue/ListQueue.of.html