PubDevProvider constructor

PubDevProvider({
  1. String host = 'https://pub.dev',
  2. Client? client,
  3. PackageCache? cache,
  4. Map<String, VersionConstraint>? constraints,
  5. String? pubspecYaml,
  6. Uri rewriteUrl(
    1. Uri url
    )?,
})

Implementation

PubDevProvider({
  this.host = 'https://pub.dev',
  http.Client? client,
  PackageCache? cache,
  Map<String, VersionConstraint>? constraints,
  String? pubspecYaml,
  this.rewriteUrl,
}) : cache = cache ?? MemoryPackageCache(),
     _client = client ?? http.Client(),
     _ownsClient = client == null,
     _constraints = {
       if (pubspecYaml != null) ..._parsePubspecConstraints(pubspecYaml),
       ...?constraints,
     };