spa property

double get spa

Scalable pixel alternative using aspect ratio Legacy formula for backward compatibility

Implementation

double get spa {
  final config = ResponsiveMasterConfig.instance;

  if (!config.enableCaching) {
    return this * (((h + w) + (240 * DeviceData.aspectRatio)) / 2) / 100;
  }

  return ResponsiveCache.getOrCompute(
    'spa_$this',
    () => this * (((h + w) + (240 * DeviceData.aspectRatio)) / 2) / 100,
    width: DeviceData.width,
    height: DeviceData.height,
    orientation: DeviceData.orientation.toString(),
  );
}