PaddingWrapper.vertical constructor

PaddingWrapper.vertical({
  1. required Widget child,
  2. double vertical = 16.0,
})

Factory constructor for vertical padding only.

Applies padding to the top and bottom sides while leaving the left and right unpadded.

Example usage:

PaddingWrapper.vertical(
  vertical: 30.0,
  child: Text('Vertically Padded Text'),
);

Implementation

factory PaddingWrapper.vertical({
  required Widget child,
  double vertical = 16.0,
}) {
  return PaddingWrapper(
    padding: EdgeInsets.symmetric(vertical: vertical),
    child: child,
  );
}