PackageMapUriResolver constructor

PackageMapUriResolver(
  1. ResourceProvider resourceProvider,
  2. Map<String, List<Folder>> packageMap
)

Create a new PackageMapUriResolver.

packageMap is a table mapping package names to the paths of the directories containing the package

Implementation

PackageMapUriResolver(this.resourceProvider, this.packageMap) {
  asserts.notNull(resourceProvider);
  asserts.notNull(packageMap);
  packageMap.forEach((name, folders) {
    if (folders.length != 1) {
      throw ArgumentError(
          'Exactly one folder must be specified for a package.'
          'Found $name = $folders');
    }
  });
}