spacePercentage method

double spacePercentage(
  1. double percentage
)

Converts the initial size to pixels based on the device type and font variant.

Example:

double result = sizeConfig.spacePercentage(percentage);

Implementation

double spacePercentage(double percentage) {
  if (percentage > 100) return _detectedSpace;
  if (percentage < 0) return 0;
  return _detectedSpace * (percentage / 100);
}