toPdfRichText method

Future<RichText> toPdfRichText(
  1. ExportInstance instance
)

Converts the Text to a pw.RichText.

Implementation

Future<pw.RichText> toPdfRichText(ExportInstance instance) async => pw.RichText(
    text: await (textSpan as TextSpan).toPdfWidget(instance),
    textAlign: textAlign?.toPdfTextAlign(),
    textDirection: textDirection?.toPdfTextDirection(),
    softWrap: softWrap,
    overflow: overflow?.toPdfTextOverflow(),
    maxLines: maxLines,
  );