TimePicker class
The time picker gives you a standardized way to let users pick a time value using touch, mouse, or keyboard input.
See also:
- DatePicker, which gives you a standardized way to let users pick a localized date value
- docs.microsoft.com/en-us/windows/apps/design/controls/time-picker
- Inheritance
-
- Object
- DiagnosticableTree
- Widget
- StatefulWidget
- TimePicker
- Available extensions
Constructors
-
TimePicker({Key? key, required DateTime? selected, ValueChanged<
DateTime> ? onChanged, VoidCallback? onCancel, HourFormat hourFormat = HourFormat.h, String? header, TextStyle? headerStyle, EdgeInsetsGeometry contentPadding = kPickerContentPadding, double popupHeight = kPickerPopupHeight, FocusNode? focusNode, bool autofocus = false, int minuteIncrement = 1, Locale? locale}) -
Creates a time picker.
const
Properties
- autofocus → bool
-
True if this widget will be selected as the initial focus when no other
node in its scope is currently focused.
final
- contentPadding → EdgeInsetsGeometry
-
The padding of the picker fields. Defaults to
kPickerContentPadding
final - focusNode → FocusNode?
-
An optional focus node to use as the focus node for this widget.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- header → String?
-
The content of the header
final
- headerStyle → TextStyle?
-
The style of the header
final
- hourFormat → HourFormat
-
The clock system to use
final
- key → Key?
-
Controls how one widget replaces another widget in the tree.
finalinherited
- locale → Locale?
-
The locale used to format the month name.
final
- minuteIncrement → int
-
The value that indicates the time increments shown in the minute picker.
For example, 15 specifies that the TimePicker minute control displays
only the choices 00, 15, 30, 45.
final
- onCancel → VoidCallback?
-
Whenever the user cancels the date change.
final
-
onChanged
→ ValueChanged<
DateTime> ? -
Whenever the current selected date is changed by the user.
final
- popupHeight → double
-
The height of the popup.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- selected → DateTime?
-
The current date selected date.
final
- use24Format → bool
-
no setter
Methods
-
createElement(
) → StatefulElement -
Creates a StatefulElement to manage this widget's location in the tree.
inherited
-
createState(
) → State< TimePicker> -
Creates the mutable state for this widget at a given location in the tree.
override
-
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.
override
-
getProperty<
T> ([dynamic def]) → T? -
Available on Widget, provided by the ItemExtension extension
-
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