toTextView static method

Text toTextView(
  1. String htmlContent, {
  2. HyperLinkCallback? linksCallback,
  3. TextStyle? defaultStyle,
  4. int? maxLines,
  5. TextAlign? textAlign,
  6. TextOverflow? textOverflow,
  7. Color? linkColor,
})

Implementation

static Text toTextView(
  String htmlContent, {
  HyperLinkCallback? linksCallback,
  TextStyle? defaultStyle,
  int? maxLines,
  TextAlign? textAlign,
  TextOverflow? textOverflow,
  Color? linkColor,
}) {
  return Text.rich(
    toTextSpan(
      htmlContent,
      linksCallback: linksCallback,
      defaultStyle: defaultStyle,
      linkColor: linkColor
    ),
    maxLines: maxLines,
    textAlign: textAlign,
    overflow: textOverflow ?? TextOverflow.clip,
  );
}