prepend2 method
Inserts two elements at the beginning of the iterable.
Takes the specified elements and inserts them at the beginning of the iterable.
Example:
void main() {
final list = [2, 3, 4];
final result = list.prepend2(0, 1);
// Result: [0, 1, 2, 3, 4]
}
Implementation
Iterable<T> prepend2(T v1, T v2) sync* {
yield v1;
yield v2;
yield* this;
}