painter static method
TextPainter
painter(
- BuildContext context,
- UEpubBlock block,
- UEpubTypography typography,
- UDocColorMode mode,
- double width, {
- int start = 0,
- 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);