Preset
private struct Preset : Codable
A timer’s configured durations without its runtime countdown state.
-
The stable identifier used to restore the original selection.
Declaration
Swift
let id: UUID -
The preset’s full duration in seconds.
Declaration
Swift
let duration: Int -
The seconds remaining at the warning threshold, or zero when disabled.
Declaration
Swift
let warning: Int -
The seconds remaining at the final threshold, or zero when disabled.
Declaration
Swift
let final: Int -
Copies the configured durations from the live timer.
Declaration
Swift
init(_ timer: Timer) -
Whether the durations fit in one day and the enabled phase thresholds descend toward zero.
Declaration
Swift
var isValid: Bool { get } -
Builds the app’s persisted timer record with a stopped countdown.
See moreDeclaration
Swift
func persistentValues(selected: Bool) -> [String : any Hashable]Parameters
selectedWhether to restore this preset as the selected timer.
View on GitHub
Install in Dash