padOnly function
Creates EdgeInsets with only the given values for left, right, top, and bottom offsets.
Example:
int leftValue = 2;
int rightValue = 4;
int topValue = 6;
int bottomValue = 8;
EdgeInsets customPadding = padOnly(l: leftValue, r: rightValue, t: topValue, b: bottomValue);
The padOnly
method returns EdgeInsets with specified offsets based on the provided parameters.
It is useful for creating custom padding with different values for each side.
Implementation
EdgeInsets padOnly({
double l = 0,
double r = 0,
double t = 0,
double b = 0,
}) =>
EdgeInsets.only(left: l, bottom: b, top: t, right: r);