itemWidthFor method

double itemWidthFor(
  1. double totalWidth
)

Implementation

double itemWidthFor(double totalWidth) {
  double spacing = this.spacing;
  double itemCount = this.itemCount;
  // item width = total width / item count - spacing
  double itemW = totalWidth / itemCount - spacing;
  itemWidth = itemW;
  return itemW;
}