TimeModelBinding class

Stateful Widget for InheritedWidget

Inheritance

Constructors

TimeModelBinding({Key? key, required Time initialTime, required Widget child, required void onChange(Time), void onChangeDateTime(DateTime)?, void onCancel()?, bool is24HrFormat = false, bool? displayHeader, Color? accentColor, bool ltrMode = true, Color? unselectedColor, String cancelText = 'cancel', String okText = 'ok', bool isOnValueChangeMode = false, Image? sunAsset, Image? moonAsset, bool blurredBackground = false, double? borderRadius, double? elevation, EdgeInsets? dialogInsetPadding, TimePickerInterval? minuteInterval, TimePickerInterval? secondInterval, bool? disableMinute, bool? disableHour, double? maxHour, double? maxMinute, double? maxSecond, double? minHour, double? minMinute, double? minSecond, String? hourLabel, String? minuteLabel, String? secondLabel, bool isInlineWidget = false, bool focusMinutePicker = false, TextStyle okStyle = const TextStyle(fontWeight: FontWeight.bold), TextStyle cancelStyle = const TextStyle(fontWeight: FontWeight.bold), ButtonStyle? buttonStyle, ButtonStyle? cancelButtonStyle, double? buttonsSpacing, double? wheelHeight, bool hideButtons = false, bool disableAutoFocusToNextInput = false, double width = 0, double height = 0, bool showSecondSelector = false, bool showCancelButton = true, TimeOfDay? sunrise, TimeOfDay? sunset, int? duskSpanInMinutes})
Constructor for the Widget

Properties

accentColor Color?
Accent color of the TimePicker.
final
blurredBackground bool
Whether to blur the background of the Modal.
final
borderRadius double?
Border radius of the Container in double.
final
buttonsSpacing double?
Spacing between ok and cancel buttons
getter/setter pair
buttonStyle ButtonStyle?
ButtonStyle is used for the showPicker methods If cancelButtonStyle is not provided, it applies to the ok and cancel buttons
getter/setter pair
cancelButtonStyle ButtonStyle?
ButtonStyle is used for the showPicker methods
getter/setter pair
cancelStyle TextStyle
Cancel button's text style TextStyle
getter/setter pair
cancelText String
Text displayed for the Cancel button.
getter/setter pair
child Widget
The child Widget to render
final
dialogInsetPadding EdgeInsets?
Inset padding of the Modal in EdgeInsets.
final
disableAutoFocusToNextInput bool
Whether to disable the auto focus to minute after hour is selected.
getter/setter pair
disableHour bool?
Disable hour picker
final
disableMinute bool?
Disable minute picker
final
displayHeader bool?
Display the sun moon animation
final
duskSpanInMinutes int?
Dusk span of time in minutes.
getter/setter pair
elevation double?
Elevation of the Modal in double.
final
focusMinutePicker bool
Whether or not the minute picker is auto focus/selected.
final
hashCode int
The hash code for this object.
no setterinherited
height double
Fixed height of the Picker container.
getter/setter pair
hideButtons bool
Whether to hide the buttons (ok and cancel). Defaults to false.
getter/setter pair
hourLabel String?
Label for the hour text.
final
initialTime Time
The initial time provided by the user
final
is24HrFormat bool
Show the time in TimePicker in 24 hour format.
final
isInlineWidget bool
Whether the widget is displayed as a popup or inline
final
isOnValueChangeMode bool
Whether to hide okText, cancelText and return value on every onValueChange.
final
key Key?
Controls how one widget replaces another widget in the tree.
finalinherited
ltrMode bool
Whether to display the time from left to right or right to left.(Standard: left to right)
final
maxHour double?
Selectable maximum hour
final
maxMinute double?
Selectable maximum minute
final
maxSecond double?
Selectable maximum second
final
minHour double?
Selectable minimum hour
final
minMinute double?
Selectable minimum minute
final
minSecond double?
Selectable minimum second
final
minuteInterval TimePickerInterval?
Steps interval while changing minute.
final
minuteLabel String?
Label for the minute text.
final
moonAsset Image?
Image asset used for the Moon.
final
okStyle TextStyle
Ok button's text style TextStyle
getter/setter pair
okText String
Text displayed for the Ok button.
getter/setter pair
onCancel → (void Function()?)
Callback for the Cancel button
final
onChange → void Function(Time)
Required Return the new time the user picked as Time.
final
onChangeDateTime → (void Function(DateTime)?)
Optional Return the new time the user picked as DateTime.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
secondInterval TimePickerInterval?
Steps interval while changing secoond.
final
secondLabel String?
Label for the second text.
final
showCancelButton bool
Whether to have the Cancel Button Widget.
getter/setter pair
showSecondSelector bool
Whether to use the second selector as well.
getter/setter pair
sunAsset Image?
Image asset used for the Sun.
final
sunrise TimeOfDay?
Sunrise time.
getter/setter pair
sunset TimeOfDay?
Sunset time.
getter/setter pair
unselectedColor Color?
Accent color of unselected text.
final
wheelHeight double?
The height of the Wheel section
getter/setter pair
width double
Fixed width of the Picker container.
getter/setter pair

Methods

createElement() StatefulElement
Creates a StatefulElement to manage this widget's location in the tree.
inherited
createState() TimeModelBindingState
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.
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}) 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

Static Methods

of(BuildContext context) TimeModelBindingState
Get the InheritedWidget's state in the tree