invalidateProcessedAssetsOf method

void invalidateProcessedAssetsOf(
  1. String package
)

Marks all assets from a package as needing to be reprocessed.

package is the name of the package to invalidate.

Implementation

void invalidateProcessedAssetsOf(String package) {
  for (final MapEntry<String, List<dynamic>> entry in assets.entries) {
    final Uri uri = Uri.parse(entry.value[GraphIndex.assetUri]);
    if (uri.pathSegments.isEmpty) continue;
    if (uri.pathSegments[0] == package) {
      entry.value[GraphIndex.assetState] = AssetState.unProcessed.index;
    }
  }
}