padding function

Widget padding(
  1. Widget widget, {
  2. double? all,
  3. double? left = 0,
  4. double? top = 0,
  5. double? right = 0,
  6. double? bottom = 0,
})

Implementation

Widget padding(
  Widget widget, {
  double? all,
  double? left = 0,
  double? top = 0,
  double? right = 0,
  double? bottom = 0,
}) {
  if (all != null) {
    return Padding(padding: EdgeInsets.all(all), child: widget);
  } else {
    return Padding(
        padding: EdgeInsets.fromLTRB(left!, top!, right!, bottom!),
        child: widget);
  }
}