paddingOnly method

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

Adds padding around the widget. EdgeInsets.symmetric() is used to create the padding.

Implementation

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