DurationPickerConstraints

data class DurationPickerConstraints(val minDuration: Duration? = null, val maxDuration: Duration? = null)

Inclusive scalar bounds applied by DurationPickerItems.

Bounds use whole-minute precision because io.github.kezlab.compose.pickers.duration.DurationPicker exposes hour and minute columns. Each provided bound must be finite and non-negative.

Parameters

minDuration

The smallest selectable duration, inclusive. Pass null to omit the lower bound.

maxDuration

The largest selectable duration, inclusive. Pass null to omit the upper bound.

Throws

if a bound is not finite, non-negative, whole-minute, or the lower bound is greater than the upper bound.

Constructors

Link copied to clipboard
constructor(minDuration: Duration? = null, maxDuration: Duration? = null)

Properties

Link copied to clipboard
Link copied to clipboard

Functions

Link copied to clipboard
fun contains(duration: Duration): Boolean

Returns whether duration is inside the configured inclusive bounds.