incrementCount method

int incrementCount(
  1. int count,
  2. int increment,
  3. int limit
)

Implementation

int incrementCount(int count, int increment, int limit) {
  if (count + MIN > (limit - increment) + MIN) {
    throw StateError('Limit exceeded');
  }

  return count + increment;
}