DurationConstraint constructor
const
DurationConstraint({})
Creates a new instance of the DurationConstraint class.
min
: An optional parameter, defaults toDuration.zero
. Specifies the minimum duration for queried assets.max
: An optional parameter, defaults toDuration(days: 1)
. Specifies the maximum duration for queried assets.allowNullable
: An optional parameter, defaults tofalse
. 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,
});