append method

void append(
  1. LineMetrics other
)

Appends another LineMetrics box that is adjacent to the current and on the same baseline. The current object will be modified to encompass the other box.

Implementation

void append(LineMetrics other) {
  assert(
    baseline == other.baseline,
    'Baselines do not match: $baseline vs ${other.baseline}',
  );
  _width = other.right - left;
  if (_ascent < other.ascent) {
    _ascent = other.ascent;
  }
  if (_descent < other.descent) {
    _descent = other.descent;
  }
  _updateSize();
}