splitAtCharacterIndex method
Splits this span at the given character index
and returns a list of one or two spans.
If index
is zero, or if index
is greater than the number of characters in this span,
a list containing just this span is returned. If this span was split, a list of two spans
is returned, containing the two new spans.
Implementation
List<InlineSpan> splitAtCharacterIndex(int index) => this is SplittableMixin<InlineSpan>
? (this as SplittableMixin<InlineSpan>).splitAt(index)
: _splitAtIndex(SplitAtIndex(index));