mainAxisPadding property

double mainAxisPadding

The total padding in the SliverConstraints.axisDirection. (In other words, for a vertical downwards-growing list, the sum of the padding on the top and bottom.)

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

Implementation

double get mainAxisPadding {
  assert(resolvedPadding != null);
  return resolvedPadding!.along(constraints.axis);
}