resolveWith method
Implementation
PaywallPosition resolveWith({
PaywallScaler? scaler,
TextDirection? textDirection,
}) {
double? dp(double? value) {
if (value == null) return null;
if (scaler == null) return value;
return scaler(value);
}
double? td(double? a, double? b) {
if (textDirection == null) return a;
return textDirection == TextDirection.rtl ? b : a;
}
return PaywallPosition(
top: dp(top),
bottom: dp(bottom),
left: dp(td(left, right)),
right: dp(td(right, left)),
width: dp(width),
height: dp(height),
);
}