evalFile method
dynamic
evalFile(})
Evaluate a file.
key is a possibly relative path.
file content will be searched by sourceContext.
If invoke is provided, will immediately
call the function after evaluation completed.
Implementation
dynamic evalFile(
String key, {
String? module,
bool globallyImport = false,
String? invoke,
List<dynamic> positionalArgs = const [],
Map<String, dynamic> namedArgs = const {},
// List<HTType> typeArgs = const [],
}) {
final source = sourceContext.getResource(key);
final result = evalSource(
source,
module: module,
globallyImport: globallyImport,
invoke: invoke,
positionalArgs: positionalArgs,
namedArgs: namedArgs,
// typeArgs: typeArgs,
);
return result;
}