PaddingWrapper.only constructor

PaddingWrapper.only({
  1. required Widget child,
  2. double left = 16.0,
  3. double right = 16.0,
  4. double top = 0.0,
  5. double bottom = 0.0,
})

Factory constructor for specific padding on each side.

Implementation

factory PaddingWrapper.only({
  required Widget child,
  double left = 16.0,
  double right = 16.0,
  double top = 0.0,
  double bottom = 0.0,
}) {
  return PaddingWrapper(
    padding:
        EdgeInsets.only(left: left, right: right, top: top, bottom: bottom),
    child: child,
  );
}