painter static method

TextPainter painter(
  1. BuildContext context,
  2. UEpubBlock block,
  3. UEpubTypography typography,
  4. UDocColorMode mode,
  5. double width, {
  6. int start = 0,
  7. int end = -1,
})

Text painter of a block (for measuring pages).

Implementation

static TextPainter painter(BuildContext context, UEpubBlock block, UEpubTypography typography, UDocColorMode mode, double width, {int start = 0, int end = -1}) => TextPainter(
  text: span(context, block, typography, mode, start: start, end: end),
  textAlign: align(block, typography),
  textDirection: direction(block),
  textScaler: MediaQuery.textScalerOf(context),
  textHeightBehavior: DefaultTextStyle.of(context).textHeightBehavior,
)..layout(minWidth: width, maxWidth: width);