TimeModelBinding class
Stateful Widget for InheritedWidget
- Inheritance
-
- Object
- DiagnosticableTree
- Widget
- StatefulWidget
- TimeModelBinding
Constructors
- TimeModelBinding({Key? key, required Time initialTime, required Widget child, required void onChange(TimeOfDay), 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, MinuteInterval? minuteInterval, bool? disableMinute, bool? disableHour, double? maxHour, double? maxMinute, double? minHour, double? minMinute, String? hourLabel, String? minuteLabel, 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})
- 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
-
Spacing between ok and cancel buttons
getter/setter pair
-
ButtonStyle is used for the createInlinePicker and showPicker methods
If
cancelButtonStyle
is not provided, it applies to the ok and cancel buttonsgetter/setter pair - cancelButtonStyle ↔ ButtonStyle?
-
ButtonStyle is used for the createInlinePicker and 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 - disableHour → bool?
-
Disable hour picker
final
- disableMinute → bool?
-
Disable minute picker
final
- displayHeader → bool?
-
Display the sun moon animation
final
- 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
- 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
-
Weather 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
- minHour → double?
-
Selectable minimum hour
final
- minMinute → double?
-
Selectable minimum minute
final
- minuteInterval → MinuteInterval?
-
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(TimeOfDay)
-
Required
Return the new time the user picked as TimeOfDay.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
- sunAsset → Image?
-
Image asset used for the Sun.
final
- unselectedColor → Color?
-
Accent color of unselected text.
final
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, 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
Static Methods
-
of(
BuildContext context) → TimeModelBindingState - Get the InheritedWidget's state in the tree