getResGridRatio function

  1. @Deprecated('Use cGetResGridRatio()$_defaultText')
double getResGridRatio({
  1. required BuildContext context,
  2. required int height,
  3. required int width,
  4. bool logData = false,
})

Implementation

@Deprecated('Use cGetResGridRatio()$_defaultText')
double getResGridRatio({
  required BuildContext context,
  required int height,
  required int width,
  bool logData = false,
}) {
  double w = (context.cWidth / (context.cWidth / width).round());
  double h = (context.cWidth / (context.cWidth / width));
  double asr = w / (h - (width - height));
  if (logData) {
    cLog('GridAspectRatio => $asr');
  }
  return asr;
}