retain method
Implementation
@override
void retain(int index, int? len, Style? style) {
if (style == null) {
return;
}
final local = math.min(length - index, len!);
final remain = len - local;
final node = _isolate(index, local);
if (remain > 0) {
assert(node.next != null);
node.next!.retain(0, remain, style);
}
node.format(style);
}