match method

Map<String, String>? match(
  1. String host
)

The parameters of host, or null when it does not match.

Implementation

Map<String, String>? match(String host) {
  final found = _regex.firstMatch(host);
  if (found == null) {
    return null;
  }
  return {for (var i = 0; i < names.length; i++) names[i]: found[i + 1]!};
}