splice method

$R splice(
  1. int index,
  2. int removeCount, [
  3. Iterable<$T>? toInsert
])

Implementation

$R splice(int index, int removeCount, [Iterable<$T>? toInsert]) => _then([
      ..._value.take(index),
      if (toInsert != null) ...toInsert,
      ..._value.skip(index + removeCount),
    ]);