Counter constructor

Counter({
  1. required num min,
  2. required num max,
  3. num? initial,
  4. num? bound,
  5. num step = 1,
  6. Configuration? configuration,
  7. ValueChanged<num>? onValueChanged,
  8. Key? key,
})

Implementation

Counter({
  required this.min,
  required this.max,
  this.initial,
  this.bound,
  this.step = 1,
  Configuration? configuration,
  this.onValueChanged,
  Key? key,
})  : assert(min < max),
      assert(initial == null || (initial >= min && initial <= max)),
      assert(bound == null || (bound >= min && bound <= max)),
      assert(initial == null || bound == null || initial >= bound),
      assert(step > 0),
      configuration = configuration ?? DefaultConfiguration(),
      super(key: key);