responsiveCount function

int responsiveCount(
  1. BuildContext context, {
  2. required double contentWidth,
})

Determines the current screen size based on the width using the provided condition.

Implementation

int responsiveCount(BuildContext context, {required double contentWidth}) {
  final count = context.width / contentWidth;
  if (count < 1) {
    return 1;
  }
  return count.toInt();
}