UrlBuilder constructor

UrlBuilder(
  1. String domain, {
  2. bool useHttps = true,
  3. String? signKey,
  4. bool includeLibraryParam = true,
})

Implementation

UrlBuilder(this.domain,
    {this.useHttps = true, this.signKey, this.includeLibraryParam = true}) {
  final domainPattern = RegExp(domainRegex);
  if (isBlank(domain)) {
    throw ArgumentError.value(
        domain, 'domain', 'At lease one domain must be passed to URLBuilder');
  } else if (!domainPattern.hasMatch(domain)) {
    throw ArgumentError.value(domain, 'domain',
        'Domain must be passed in as a fully-qualified domain name and should not include a protocol or any path element, i.e. "example.imgix.net".');
  }
}