GeigerUrl.fromSpec constructor

GeigerUrl.fromSpec(
  1. String uri
)

Created a GeigerUrl with the given uri.

Throws MalformedUrlException if a malformed URL was received

Implementation

GeigerUrl.fromSpec(String uri) {
  var m = _urlPattern.firstMatch(uri);
  if (m == null) {
    throw MalformedUrlException('Matcher was unable to match the string "' +
        uri +
        '" to regexp ' +
        _urlPattern.pattern);
  }
  _protocol = m[1]!;
  init(m[2]!, m[3]!);
}