TimePicker class
A time picker widget that can be used to select a time duration based on the Time picker mode CupertinoTimerPickerMode.
- Inheritance
-
- Object
- DiagnosticableTree
- Widget
- StatelessWidget
- TimePicker
Constructors
- TimePicker({Key? key, int minuteInterval = 1, required CupertinoTimerPickerMode mode, TextStyle? textStyle, double itemExtent = 32.0, required dynamic onChange(Duration), Duration? initialDuration, int secondInterval = 1, CupertinoTextThemeData? pickerThemeData})
-
const
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- initialDuration → Duration?
-
The initial duration to be displayed in the picker.
When initialDuration is null, the picker will display a duration of zero.
final
- itemExtent → double
-
The height of each item in the picker.
The extent value should be greater than 0, otherwise an assertion error will be thrown.
by default the itemExtent value is taking the
_kItemExtentvalue of the CupertinoTimerPicker which is 32.0.final - key → Key?
-
Controls how one widget replaces another widget in the tree.
finalinherited
- minuteInterval → int
-
The interval of the minutes in the time picker.
By default minuteInterval is set to 1, which means that the user can select any minute value from 0 to 59.
final
- mode → CupertinoTimerPickerMode
-
The mode of the time picker CupertinoTimerPickerMode.
final
- onChange → dynamic Function(Duration)
-
The callback function that is called when the selected time changes.
a required parameter that cannot be null, and it will be called with the selected time duration.
final
- pickerThemeData → CupertinoTextThemeData?
-
The theme data to be used for the picker.
When pickerThemeData is null, the default theme data of the CupertinoTimerPicker will be used.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- secondInterval → int
-
The interval of the seconds in the time picker.
By default secondInterval is set to 1, which means that the user can select any second value from 0 to 59.
if secondInterval is outside the range of 1 to 59 an assertion error will be thrown.
final
- textStyle → TextStyle?
-
The text style to be used for the items in the picker.
When the textstyle is null the default text style of the CupertinoTimerPicker will be used.
final
Methods
-
build(
BuildContext context) → Widget -
Describes the part of the user interface represented by this widget.
override
-
createElement(
) → StatelessElement -
Creates a StatelessElement to manage this widget's location in the tree.
inherited
-
debugDescribeChildren(
) → List< DiagnosticsNode> -
Returns a list of DiagnosticsNode objects describing this node's
children.
inherited
-
debugFillProperties(
DiagnosticPropertiesBuilder properties) → void -
Add additional properties associated with the node.
inherited
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toDiagnosticsNode(
{String? name, DiagnosticsTreeStyle? style}) → DiagnosticsNode -
Returns a debug representation of the object that is used by debugging
tools and by DiagnosticsNode.toStringDeep.
inherited
-
toString(
{DiagnosticLevel minLevel = DiagnosticLevel.info}) → String -
A string representation of this object.
inherited
-
toStringDeep(
{String prefixLineOne = '', String? prefixOtherLines, DiagnosticLevel minLevel = DiagnosticLevel.debug, int wrapWidth = 65}) → String -
Returns a string representation of this node and its descendants.
inherited
-
toStringShallow(
{String joiner = ', ', DiagnosticLevel minLevel = DiagnosticLevel.debug}) → String -
Returns a one-line detailed description of the object.
inherited
-
toStringShort(
) → String -
A short, textual description of this widget.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited