plus method
Creates a copy of this padding, plus the given parameters.
Example:
// Same as Pad(all: 40, top: 10)
Pad(all: 40).plus(top: 10);
Implementation
Pad plus({
double? left,
double? top,
double? right,
double? bottom,
double? all = 0,
double? vertical = 0,
double? horizontal = 0,
}) {
return Pad(
left: this.left + (left ?? 0),
top: this.top + (top ?? 0),
right: this.right + (right ?? 0),
bottom: this.bottom + (bottom ?? 0),
all: all ?? 0,
vertical: vertical ?? 0,
horizontal: horizontal ?? 0,
);
}