CupertinoTimerPicker class Null safety

A countdown timer picker in iOS style.

This picker shows a countdown duration with hour, minute and second spinners. The duration is bound between 0 and 23 hours 59 minutes 59 seconds.

There are several modes of the timer picker listed in CupertinoTimerPickerMode.

The picker has a fixed size of 320 x 216, in logical pixels, with the exception of CupertinoTimerPickerMode.hms, which is 330 x 216. If the parent widget provides more space than it needs, the picker will position itself according to its alignment property.

This example shows a CupertinoTimerPicker that returns a countdown duration.
To create a local project with this code sample, run:
flutter create --sample=cupertino.CupertinoTimerPicker.1 mysample

See also:



CupertinoTimerPicker({Key? key, CupertinoTimerPickerMode mode = CupertinoTimerPickerMode.hms, Duration initialTimerDuration =, int minuteInterval = 1, int secondInterval = 1, AlignmentGeometry alignment =, Color? backgroundColor, required ValueChanged<Duration> onTimerDurationChanged})
Constructs an iOS style countdown timer picker.


alignment AlignmentGeometry
Defines how the timer picker should be positioned within its parent.
backgroundColor Color?
Background color of timer picker.
hashCode int
The hash code for this object.
@nonVirtual, read-only, inherited
initialTimerDuration Duration
The initial duration of the countdown timer.
key Key?
Controls how one widget replaces another widget in the tree.
final, inherited
minuteInterval int
The granularity of the minute spinner. Must be a positive integer factor of 60.
mode CupertinoTimerPickerMode
The mode of the timer picker.
onTimerDurationChanged ValueChanged<Duration>
Callback called when the timer duration changes.
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited
secondInterval int
The granularity of the second spinner. Must be a positive integer factor of 60.


createElement() StatefulElement
Creates a StatefulElement to manage this widget's location in the tree.
createState() State<StatefulWidget>
Creates the mutable state for this widget at a given location in the tree.
debugDescribeChildren() List<DiagnosticsNode>
Returns a list of DiagnosticsNode objects describing this node's children.
@protected, inherited
debugFillProperties(DiagnosticPropertiesBuilder properties) → void
Add additional properties associated with the node.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed.
toDiagnosticsNode({String? name, DiagnosticsTreeStyle? style}) DiagnosticsNode
Returns a debug representation of the object that is used by debugging tools and by DiagnosticsNode.toStringDeep.
toString({DiagnosticLevel minLevel =}) String
A string representation of this object.
toStringDeep({String prefixLineOne = '', String? prefixOtherLines, DiagnosticLevel minLevel = DiagnosticLevel.debug}) String
Returns a string representation of this node and its descendants.
toStringShallow({String joiner = ', ', DiagnosticLevel minLevel = DiagnosticLevel.debug}) String
Returns a one-line detailed description of the object.
toStringShort() String
A short, textual description of this widget.


operator ==(Object other) bool
The equality operator.
@nonVirtual, inherited