padding method
Returns a new widget with the given padding.
Implementation
Widget padding({
double? all,
double? horizontal,
double? vertical,
double? left,
double? top,
double? right,
double? bottom,
}) {
return Padding(
padding: all != null
? .all(all)
: .only(
left: left ?? (horizontal ?? 0),
right: right ?? (horizontal ?? 0),
top: top ?? (vertical ?? 0),
bottom: bottom ?? (vertical ?? 0),
),
child: this,
);
}