crossAxisPadding property

double crossAxisPadding

The total padding in the cross-axis direction. (In other words, for a vertical downwards-growing list, the sum of the padding on the left and right.)

Only valid after layout has started, since before layout the render object doesn't know what direction it will be laid out in.


double get crossAxisPadding {
  assert(resolvedPadding != null);
  switch (constraints.axis) {
    case Axis.horizontal:
      return resolvedPadding!.vertical;
    case Axis.vertical:
      return resolvedPadding!.horizontal;