calcTextHeight static method

int calcTextHeight(
  1. TextPainter p,
  2. String demoText
)

Implementation

static int calcTextHeight(TextPainter p, String demoText) {
  TextPainter painter = PainterUtils.create(
      p, demoText, p.text!.style!.color, p.text!.style!.fontSize);
  painter.layout();
  return painter.height.toInt();
}