sp static method

double sp(
  1. double value
)

Scales a font size using the smaller of width/height ratios.

Implementation

static double sp(double value) {
  assert(_initialized, 'Call ScreenUtil.init(context) first.');
  final scale =
      (_screenWidth / _designWidth + _screenHeight / _designHeight) / 2;
  return value * scale;
}