gridAxisCountOf static method
Implementation
static int gridAxisCountOf(BuildContext context) {
final isPortraitMode = isPortrait(context);
final maxWidth = maxWidthOf(context);
final maxExtent =
(kGridAxisCountPW * kGridItemWidth) + (kPadding12 * 2) + kPadding16;
if (maxWidth > maxExtent) {
return isPortraitMode ? kGridAxisCountPW : kGridAxisCountLW;
}
return isPortraitMode ? kGridAxisCountP : kGridAxisCountL;
}