computeDistanceToBaseline method

  1. @override
double computeDistanceToBaseline()
override

Compute distance to baseline of replaced element

Implementation

@override
double computeDistanceToBaseline() {
  double marginTop = renderStyle.marginTop.computedValue;
  double marginBottom = renderStyle.marginBottom.computedValue;

  // Use margin-bottom as baseline if layout has no children
  return marginTop + boxSize!.height + marginBottom;
}