mainAxisPadding property Null safety

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(constraints != null);
  assert(constraints.axis != null);
  assert(resolvedPadding != null);
  return resolvedPadding!.along(constraints.axis);
}