loadConfig method

Future<SyncPackageResolver> loadConfig (
  1. dynamic uri,
  2. {Client client}

Loads a package config file from uri and returns its package resolution strategy.

This supports file:, http:, data: and package: URIs. It throws an UnsupportedError for any other schemes. If client is passed and an HTTP request is needed, it's used to make that request; otherwise, a default client is used.

uri may be a String or a Uri.


static Future<SyncPackageResolver> loadConfig(uri,
    {http.Client client}) async {
  uri = asUri(uri, "uri");
  return new SyncPackageResolver.config(
      await loadConfigMap(uri, client: client),
      uri: uri);