beforePadding property Null safety

double beforePadding

The padding in the scroll direction on the side nearest the 0.0 scroll direction.

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 beforePadding {
  assert(constraints != null);
  assert(constraints.axisDirection != null);
  assert(constraints.growthDirection != null);
  assert(resolvedPadding != null);
  switch (applyGrowthDirectionToAxisDirection(constraints.axisDirection, constraints.growthDirection)) {
    case AxisDirection.up:
      return resolvedPadding!.bottom;
    case AxisDirection.right:
      return resolvedPadding!.left;
    case AxisDirection.down:
      return resolvedPadding!.top;
    case AxisDirection.left:
      return resolvedPadding!.right;
  }
}