rememberDurationPickerState

Creates and remembers a DurationPickerState.

initialDuration is read only when the state is first created.

Return

A saveable duration picker state.

Parameters

initialDuration

Initial finite, non-negative, whole-minute duration.

Throws

if initialDuration is outside the supported duration domain.


Creates and remembers a DurationPickerState normalized by items.

The initial value and item source are read when the state is first created. On recreation, the saved duration is coerced by the same item source so restored state remains selectable.

Return

A state initialized to the closest selectable duration.

Parameters

items

Selectable hour/minute sources and scalar bounds.

initialDuration

Requested initial finite, non-negative, whole-minute duration.

Throws

if the requested value or item configuration is invalid or the item configuration has no selectable scalar combination.