computeDistanceToLastLineBaseline method

double computeDistanceToLastLineBaseline()

Compute distance to baseline of last text line

Implementation

double computeDistanceToLastLineBaseline() {
  double lastLineOffset = _lineOffset[_lineOffset.length - 1];
  ui.LineMetrics lastLineMetrics = _lineMetrics[_lineMetrics.length - 1];

  // Use the baseline of the last line as paragraph baseline.
  return text.text == '' ? 0.0 : (lastLineOffset + lastLineMetrics.ascent);
}