paddingOnly method

Padding paddingOnly({
  1. double top = 0,
  2. double right = 0,
  3. double bottom = 0,
  4. double left = 0,
})

Applies padding to specific sides (top, right, bottom, left).

top Padding for the top side. right Padding for the right side. bottom Padding for the bottom side. left Padding for the left side.

Implementation

Padding paddingOnly(
    {double top = 0, double right = 0, double bottom = 0, double left = 0}) {
  return Padding(
    padding:
        EdgeInsets.only(top: top, right: right, bottom: bottom, left: left),
    child: this,
  );
}