tryBuild static method
Attempts to build a given Dart source files in the given PrepareBuilder.
Implementation
static Future<void> tryBuild(
SourceFile source,
PrepareBuilder builder,
) async {
final stopwatch = Stopwatch()..start();
final hasBuilded = await builder.build(source);
if (hasBuilded) {
final elapsedTime = "${stopwatch.elapsedMilliseconds} ms";
log(
"Building the specified path: ${source.path} ($elapsedTime)",
color: gray,
);
}
}