onlyPadding function

dynamic onlyPadding({
  1. required Widget child,
  2. dynamic top = 0.0,
  3. dynamic right = 0.0,
  4. dynamic bottom = 0.0,
  5. dynamic left = 0.0,
})

onlyPadding function with @required child widget

Implementation

onlyPadding(
    {required Widget child, top = 0.0, right = 0.0, bottom = 0.0, left = 0.0}) {
  return Padding(
    padding:
        EdgeInsets.only(top: top, right: right, bottom: bottom, left: left),
    child: child,
  );
}