padding method
Widget
padding(
{ - double? t,
- double? b,
- double? l,
- double? r,
- double? v,
- double? h,
- double? tlr,
- double? blr,
- double others = 0,
- double? all,
})
YourWidget().padding() // Only works on widget with no padding property
Implementation
Widget padding(
{double? t,
double? b,
double? l,
double? r,
double? v,
double? h,
double? tlr,
double? blr,
double others = 0,
double? all}) =>
Padding(
padding: all != null
? EdgeInsets.all(all)
: EdgeInsets.only(
bottom: blr ?? v ?? b ?? others,
top: tlr ?? v ?? t ?? others,
left: blr ?? tlr ?? h ?? l ?? others,
right: blr ?? tlr ?? h ?? r ?? others),
child: this,
);