increment method

void increment([
  1. num? customStep
])

Increment by step.

Implementation

void increment([num? customStep]) {
  final newValue = val + (customStep ?? step);
  if (max != null && newValue > max!) {
    emit(max!);
  } else {
    emit(newValue);
  }
}