decrement method

void decrement([
  1. num? customStep
])

Decrement by step.

Implementation

void decrement([num? customStep]) {
  final newValue = val - (customStep ?? step);
  if (min != null && newValue < min!) {
    emit(min!);
  } else {
    emit(newValue);
  }
}