DurationConstraint constructor
const
DurationConstraint({})
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 totrue
, 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,
});