paddingOnly method
T
paddingOnly({})
Sets custom padding for each side with priority resolution.
Implementation
T paddingOnly({
double? horizontal,
double? vertical,
double? start,
double? end,
double? left,
double? right,
double? top,
double? bottom,
}) {
// Priority resolution (most specific wins)
final resolvedLeft = left ?? horizontal;
final resolvedRight = right ?? horizontal;
final resolvedTop = top ?? vertical;
final resolvedBottom = bottom ?? vertical;
// Use directional if start/end provided
if (start != null || end != null) {
return padding(
EdgeInsetsGeometryMix.directional(
start: start ?? resolvedLeft,
end: end ?? resolvedRight,
top: resolvedTop,
bottom: resolvedBottom,
),
);
}
// Otherwise use regular EdgeInsets
return padding(
EdgeInsetsGeometryMix.only(
left: resolvedLeft,
right: resolvedRight,
top: resolvedTop,
bottom: resolvedBottom,
),
);
}