prepend4 method
Inserts four 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 = [4, 5, 6];
final result = list.prepend4(0, 1, 2, 3);
// Result: [0, 1, 2, 3, 4, 5, 6]
}
Implementation
Iterable<T> prepend4(T v1, T v2, T v3, T v4) sync* {
yield v1;
yield v2;
yield v3;
yield v4;
yield* this;
}