findLinkAt function

LinkMatch? findLinkAt(
  1. String text,
  2. int start
)

The web link starting at start in text, or null if none starts there.

Finds the same links as findLinks, but only one starting exactly at start. A link starts a word, so a position in the middle of a word or an email address finds nothing.

A start at the end of text finds nothing. Throws a RangeError if start is negative or past the end of text.

Implementation

LinkMatch? findLinkAt(String text, int start) {
  RangeError.checkValueInInterval(start, 0, text.length, 'start');
  if (start == text.length) return null;

  return _findLinkAt(text, start);
}