isUrl static method

bool isUrl(
  1. String text
)

Implementation

static bool isUrl(String text) {
  try {
    Uri.parse(text);
    return true;
  } catch (_) {
    return false;
  }
}