DurationConstraint constructor

const DurationConstraint({
  1. Duration min = Duration.zero,
  2. Duration max = const Duration(days: 1),
  3. bool allowNullable = false,
})

Creates a new instance of the DurationConstraint class.

  • min: An optional parameter, defaults to Duration.zero. Specifies the minimum duration for queried assets.
  • max: An optional parameter, defaults to Duration(days: 1). Specifies the maximum duration for queried assets.
  • allowNullable: An optional parameter, defaults to false. If set to true, assets with null or undefined durations will be returned.

Implementation

const DurationConstraint({
  this.min = Duration.zero,
  this.max = const Duration(days: 1),
  this.allowNullable = false,
});