splice function
Arrays
Implementation
List splice(List list, int index, [num howMany = 0, dynamic elements]) {
var endIndex = index + howMany.truncate();
list.removeRange(index, endIndex >= list.length ? list.length : endIndex);
if (elements != null) {
list.insertAll(index, elements is List ? elements : <String>[elements]);
}
return list;
}