insert method
Insert text
at specified character index
with style style
.
Implementation
@override
void insert(int index, String value, NotusStyle? style) {
assert(index == 0 || (index > 0 && index < length));
if (isEmpty) {
assert(index == 0);
final node = defaultChild;
add(node);
node!.insert(index, value, style);
} else {
final result = lookup(index);
result.node!.insert(result.offset, value, style);
}
}