CompileContext constructor

CompileContext(
  1. AssetId libraryPath, {
  2. required Map<String, Set<String>> policyExceptions,
  3. required Map<String, Set<String>> policyExceptionsInPackages,
  4. required bool enableDevTools,
  5. required bool isNullSafe,
})

Creates a CompileContext for the provided libraryPath.

Implementation

factory CompileContext(
  AssetId libraryPath, {
  required Map<String, Set<String>> policyExceptions,
  required Map<String, Set<String>> policyExceptionsInPackages,
  required bool enableDevTools,
  required bool isNullSafe,
}) {
  return _LibraryCompileContext(
    enableDevTools: enableDevTools,
    isNullSafe: isNullSafe,
    path: libraryPath.toRelativeUrl(),
    policyExceptionsPerFiles: policyExceptions,
    policyExceptionsPerPackages: policyExceptionsInPackages,
  );
}