getTrailingTextBoundaryAt method

int? getTrailingTextBoundaryAt(
  1. int position

Returns the offset of the closest text boundary after the given position, or null if there is no boundary can be found after position.

The return value, if not null, is usually greater than position.

The range of the return value is given by the closed interval [0, string.length].


int? getTrailingTextBoundaryAt(int position) {
  final int end = getTextBoundaryAt(max(0, position)).end;
  return end >= 0 ? end : null;