resolveScaledSpPx static method
double
resolveScaledSpPx(
- double base,
- AppDimensContextLike scope,
- DpQualifier qualifier, {
- bool fontScale = true,
- Inverter inverter = Inverter.standard,
- bool ignoreMultiWindows = false,
- bool applyAspectRatio = false,
- double? customSensitivityK,
Rendered physical pixels of a scaled sp resolution.
Implementation
static double resolveScaledSpPx(
double base,
AppDimensContextLike scope,
DpQualifier qualifier, {
bool fontScale = true,
Inverter inverter = Inverter.standard,
bool ignoreMultiWindows = false,
bool applyAspectRatio = false,
double? customSensitivityK,
}) {
final value = resolveScaledSpValue(base, scope, qualifier,
fontScale: fontScale,
inverter: inverter,
ignoreMultiWindows: ignoreMultiWindows,
applyAspectRatio: applyAspectRatio,
customSensitivityK: customSensitivityK);
final fs = fontScale ? scope.dimenMetrics.fontScale : 1.0;
return value * scope.dimenMetrics.density * (fs > 0 ? fs : 1.0);
}