increment method
- 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);
}
}
Increment by step.
void increment([num? customStep]) {
final newValue = val + (customStep ?? step);
if (max != null && newValue > max!) {
emit(max!);
} else {
emit(newValue);
}
}