getUrls method

List<String> getUrls()

Implementation

List<String> getUrls() {
  final urlPattern = RegExp(
    r"((https?:\/\/)|(www\.))[\w\d\-._~:/?#\[\]@!$&\'()*+,;=\%]+",
    caseSensitive: false,
  );

  return urlPattern.allMatches(this).map((match) => match.group(0)!).toList();
}