getGridRatio function

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

Implementation

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