replaceSourceRange method
Exact UTF-16 source splice. Unlike input replacement this never snaps the supplied range or preserves surrounding Markdown wrappers.
Implementation
bool replaceSourceRange(
int start,
int end,
String text, {
int? expectedRevision,
bool replaceAll = false,
}) => _observe(
ReplaceSourceRangeCall(start, end, text, replaceAll: replaceAll),
() => _replaceSourceRange(
start,
end,
text,
expectedRevision: expectedRevision,
replaceAll: replaceAll,
),
);