insertAll method
Insert all the entries in the given iterable.
If above
is non-null, the entries are inserted just above above
.
Otherwise, the entries are inserted on top.
Implementation
void insertAll(Iterable<OverlayEntry> entries, { OverlayEntry above }) {
assert(above == null || (above._overlay == this && _entries.contains(above)));
if (entries.isEmpty)
return;
for (OverlayEntry entry in entries) {
assert(entry._overlay == null);
entry._overlay = this;
}
setState(() {
final int index = above == null ? _entries.length : _entries.indexOf(above) + 1;
_entries.insertAll(index, entries);
});
}