PaddingWrapper.symmetric constructor

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

Factory constructor for symmetric padding (vertical and horizontal).

The vertical and horizontal parameters specify the padding for vertical and horizontal sides, respectively.

Example usage:

PaddingWrapper.symmetric(
  vertical: 10.0,
  horizontal: 20.0,
  child: Text('Symmetrically Padded Text'),
);

Implementation

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