asString method
Returns the text between two positions as a string.
start
ist the position to start.
end
is the the end of the wanted text.
if isInclusive
is true end
is part of the returned text.
Implementation
String asString(
{required Position start,
required Position end,
bool isInclusive = false}) {
final list = asList(start: start, end: end, isInclusive: isInclusive);
return list.join('\n');
}