getSize function

double getSize(
  1. double size, {
  2. bool scale = false,
})

Implementation

double getSize(double size, {bool scale = false}) {
  if (!scale) {
    return size;
  }
  double baseWidth = isMobile()
      ? 414
      : isTablet()
      ? 768
      : 1920;
  return size * (ScreenSize().width / baseWidth);
}