detect method

dynamic detect(
  1. String url
)

Implementation

dynamic detect(String url) {
  for (var entry in regexes.entries) {
    if (RegExp(entry.value).hasMatch(url)) {
      return classes[entry.key];
    }
  }
}