insertAt method
New list with value inserted at index (clamped to 0..length).
Audited: 2026-06-12 11:26 EDT
Implementation
@useResult
List<T> insertAt(int index, T value) {
final List<T> out = List<T>.of(this);
out.insert(index.clamp(0, length), value);
return out;
}