getMinPixels method

int getMinPixels(
  1. int totalPixels
)

Get the min pixels, given the totalPixels.

Implementation

int getMinPixels(int totalPixels) {
  final minPixel = _minPixel;
  final minPercent = _minPercent;
  if (minPixel != null) {
    assert(minPixel < totalPixels);
    return minPixel;
  } else if (minPercent != null) {
    return (totalPixels * (minPercent / 100)).round();
  } else {
    return 0;
  }
}