minus method
Creates a copy of this padding, minus the given parameters.
Example:
// Same as Pad(all: 40, top: -10)
Pad(all: 40).minus(top: 10);
Implementation
Pad minus({
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 != null) ? -all : 0,
vertical: (vertical != null) ? -vertical : 0,
horizontal: (horizontal != null) ? -horizontal : 0,
);
}