paintExtentOf method Null safety

  1. @protected
double paintExtentOf(
  1. RenderBox child
)
protected">@protected

Returns the dimension of the given child in the main axis, as given by the child's RenderBox.size property. This is only valid after layout.

Implementation

@protected
double paintExtentOf(RenderBox child) {
  assert(child != null);
  assert(child.hasSize);
  switch (constraints.axis) {
    case Axis.horizontal:
      return child.size.width;
    case Axis.vertical:
      return child.size.height;
  }
}