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