getUrlFromText method

String? getUrlFromText(
  1. String text
)

Implementation

String? getUrlFromText(String text) {
  String? url;
  Iterable<RegExpMatch> match =
      ChatUIKitSettings.defaultUrlRegExp.allMatches(text);
  if (match.isNotEmpty) {
    url = text.substring(match.first.start, match.first.end);
  }
  return url;
}