withPadding method
Returns a new PriceRange with proportional top and bottom padding.
Implementation
PriceRange withPadding({
double topPaddingPercent = 0.08,
double bottomPaddingPercent = 0.08,
}) {
final s = span == 0 ? 1.0 : span;
final topPad = s * topPaddingPercent;
final bottomPad = s * bottomPaddingPercent;
return PriceRange(min - bottomPad, max + topPad);
}