paintExtentOf method Null safety

  1. @protected
double paintExtentOf(
  1. RenderBox child

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.


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