isURL function

bool isURL(
  1. String s
)

Implementation

bool isURL(String s) {
  // Improved regex pattern for URL validation
  final pattern = r'^(https?|ftp):\/\/[^\s/$.?#].[^\s]*$';
  return _hasMatch(s, pattern);
}