compileStringToResultAsync function
Future<CompileResult>
compileStringToResultAsync(
- String source, {
- Syntax? syntax,
- bool color = false,
- Logger? logger,
- Iterable<
AsyncImporter> ? importers, - PackageConfig? packageConfig,
- Iterable<
String> ? loadPaths, - Iterable<
AsyncCallable> ? functions, - OutputStyle? style,
- AsyncImporter? importer,
- Object? url,
- bool quietDeps = false,
- bool verbose = false,
- bool sourceMap = false,
- bool charset = true,
- Iterable<
Deprecation> ? silenceDeprecations, - Iterable<
Deprecation> ? fatalDeprecations, - Iterable<
Deprecation> ? futureDeprecations,
Like compileStringToResult, except it runs asynchronously.
Running asynchronously allows this to take AsyncImporters rather than synchronous Importers. However, running asynchronously is also somewhat slower, so compileStringToResult should be preferred if possible.
Implementation
Future<CompileResult> compileStringToResultAsync(String source,
{Syntax? syntax,
bool color = false,
Logger? logger,
Iterable<AsyncImporter>? importers,
PackageConfig? packageConfig,
Iterable<String>? loadPaths,
Iterable<AsyncCallable>? functions,
OutputStyle? style,
AsyncImporter? importer,
Object? url,
bool quietDeps = false,
bool verbose = false,
bool sourceMap = false,
bool charset = true,
Iterable<Deprecation>? silenceDeprecations,
Iterable<Deprecation>? fatalDeprecations,
Iterable<Deprecation>? futureDeprecations}) =>
c.compileStringAsync(source,
syntax: syntax,
logger: logger,
importCache: AsyncImportCache(
importers: importers,
packageConfig: packageConfig,
loadPaths: loadPaths),
functions: functions,
style: style,
importer: importer,
url: url,
quietDeps: quietDeps,
verbose: verbose,
sourceMap: sourceMap,
charset: charset,
silenceDeprecations: silenceDeprecations,
fatalDeprecations: fatalDeprecations,
futureDeprecations: futureDeprecations);