getTextBoundaryAt method
- int position
Returns the text boundary range that encloses the input position.
The returned TextRange may contain -1
, which indicates no boundaries
can be found in that direction.
Implementation
TextRange getTextBoundaryAt(int position) {
final int start = getLeadingTextBoundaryAt(position) ?? -1;
final int end = getTrailingTextBoundaryAt(position) ?? -1;
return TextRange(start: start, end: end);
}