indexIncrement method

void indexIncrement(
  1. String? key,
  2. int maxIndex
)

Implementation

void indexIncrement(String? key, int maxIndex) {
  failCounter = 0;
  if (key != null) {
    routeIndex[key] = (routeIndex[key] == null)
        ? (maxIndex == 0 ? 0 : 1)
        : (routeIndex[key] < maxIndex ? routeIndex[key] + 1 : 0);
  } else {
    currentAdIndex = currentAdIndex < maxIndex ? currentAdIndex + 1 : 0;
  }
}