compileFile method

Uint8List compileFile(
  1. String key, {
  2. CompilerConfig? config,
  3. Version? version,
})

Compile a source within current sourceContext. This won't execute the code, so runtime errors will not be reported.

Implementation

Uint8List compileFile(
  String key, {
  CompilerConfig? config,
  Version? version,
}) {
  final source = sourceContext.getResource(key);
  return _compileSource(
    source,
    version: version,
  );
}