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