splitAtIndex abstract method

List<T> splitAtIndex(
  1. SplitAtIndex index, {
  2. bool ignoreFloatedWidgetSpans = false,
})

Splits this object at the given index and returns a list of one or two objects. If index is zero, or if index is greater than the number of items in this object, a list containing just this object is returned. If this object was split, a list of two objects is returned, containing the two new split objects.

IMPORTANT: When implementing this method, index.value must be either:

  1. Reduced by the total number of items in this object, if index.value is greater than or equal to the total number of items in this object.
  2. Or, set to zero if index.value is less than the total number of items in this object -- in which case this object should be split at index.value, and the two new split objects should be returned.

Classes that adopt this mixin MUST implement this method.

Implementation

List<T> splitAtIndex(
  SplitAtIndex index, {
  bool ignoreFloatedWidgetSpans = false,
});