Urn constructor

Urn({
  1. required String nid,
  2. required String nss,
  3. String fragment = '',
  4. String rComponent = '',
  5. Map<String, String>? qComponents,
})

Constructor.

As per RFC 8141 Section 3.1, the NSS and NID are converted to lower-case.

Implementation

Urn({
  required String nid,
  required String nss,
  this.fragment = '',
  this.rComponent = '',
  Map<String, String>? qComponents,
}) : nid = nid.toLowerCase(),
     nss = nss.toLowerCase(),
     _qComponents = Map.from(qComponents ?? {});