getChildMarginTop method

double getChildMarginTop(
  1. RenderBox? child
)

Implementation

double getChildMarginTop(RenderBox? child) {
  if (child == null || child is! RenderBoxModel) {
    return 0;
  }
  // Default to the child's own collapsed top (which may include
  // parent collapsing when the child is the first in-flow child).
  // Call sites that are resolving sibling adjacency will adjust to
  // use the sibling-oriented top when appropriate.
  double result = child.renderStyle.collapsedMarginTop;
  return result;
}