Range constructor

const Range({
  1. num? min,
  2. num? max,
  3. bool inclusive = true,
})

Validator that checks if a num value falls within a specified range. Either min, max, or both must be provided.

Implementation

const Range({this.min, this.max, this.inclusive = true})
    : assert(
        min != null || max != null,
        'At least one of min or max must be provided.',
      );