margin method

Widget margin({
  1. double? horizontal,
  2. double? vertical,
  3. double? top,
  4. double? right,
  5. double? bottom,
  6. double? left,
  7. double? all,
})

Implementation

Widget margin({
  double? horizontal,
  double? vertical,
  double? top,
  double? right,
  double? bottom,
  double? left,
  double? all,
}) {
  return Padding(
    padding: EdgeInsets.only(
      top: top ?? vertical ?? all ?? 0,
      bottom: bottom ?? vertical ?? all ?? 0,
      left: left ?? horizontal ?? all ?? 0,
      right: right ?? horizontal ?? all ?? 0,
    ),
    child: this,
  );
}