convertAsync function

Future<ConversionResult> convertAsync(
  1. String html, {
  2. ConversionOptions? options,
  3. Visitor? visitor,
})

Converts html to Markdown over the in-process native bridge, surfaced asynchronously.

The bridge is synchronous, so this is the same conversion as convert behind a future — it exists for callers that are already async.

Implementation

Future<ConversionResult> convertAsync(
  String html, {
  ConversionOptions? options,
  Visitor? visitor,
}) {
  return Future<ConversionResult>.sync(
    () => convert(html, options: options, visitor: visitor),
  );
}