FormeTimeField class

example

FormeTimeField(
     validator: FormeValidates.notNull(errorText: 'required'),
     triggerBuilder: (state) {
       return InkWell(
         focusNode: state.focusNode,
         onTap: state.showPicker,
         child: InputDecorator(
           isFocused: state.hasFocus,
           isEmpty: state.value == null,
           decoration: InputDecoration(
               errorText: state.errorText,
               labelText: 'Time Picker'),
           child: Text(state.value?.toString() ?? ''),
         ),
       );
     },
     name: 'time',
   )
Inheritance

Constructors

FormeTimeField({Key? key, String? name, TimeOfDay? initialValue, FormeAsyncValidator<TimeOfDay?>? asyncValidator, Duration? asyncValidatorDebounce, AutovalidateMode? autovalidateMode, FormeFieldDecorator<TimeOfDay?>? decorator, bool enabled = true, FocusNode? focusNode, FormeFieldInitialized<TimeOfDay?>? onInitialized, FormeFieldSetter<TimeOfDay?>? onSaved, FormeFieldStatusChanged<TimeOfDay?>? onStatusChanged, int? order, bool quietlyValidate = false, bool readOnly = false, bool requestFocusOnUserInteraction = true, FormeFieldValidationFilter<TimeOfDay?>? validationFilter, FormeValidator<TimeOfDay?>? validator, required FormeTimeTriggerBuilder triggerBuilder, Offset? anchorPoint, String? cancelText, String? confirmText, String? errorInvalidText, String? helpText, String? hourLabelText, TimePickerEntryMode? initialEntryMode, String? minuteLabelText, EntryModeChangeCallback? onEntryModeChanged, RouteSettings? routeSettings, TransitionBuilder? transitionBuilder, bool useRootNavigator = true})

Properties

anchorPoint Offset?
final
asyncValidator → FormeAsyncValidator<TimeOfDay?>?
used to perform an async validation
finalinherited
asyncValidatorDebounce Duration?
not worked when validate manually
finalinherited
autovalidateMode AutovalidateMode
finalinherited
builder → FormeFieldBuilder<TimeOfDay?>
finalinherited
cancelText String?
final
confirmText String?
final
decorator → FormeFieldDecorator<TimeOfDay?>?
used to decorate field
finalinherited
enabled bool
whether field is enabled,
finalinherited
errorInvalidText String?
final
fieldType Type
no setterinherited
focusNode FocusNode?
finalinherited
hashCode int
The hash code for this object.
no setterinherited
helpText String?
final
hourLabelText String?
final
initialEntryMode TimePickerEntryMode?
final
initialValue TimeOfDay?
initial value
finalinherited
key Key?
Controls how one widget replaces another widget in the tree.
finalinherited
minuteLabelText String?
final
name String?
field name
finalinherited
onEntryModeChanged EntryModeChangeCallback?
final
onInitialized → FormeFieldInitialized<TimeOfDay?>?
called immediately after FormeFieldState.initStatus
finalinherited
onSaved → FormeFieldSetter<TimeOfDay?>?
finalinherited
onStatusChanged → FormeFieldStatusChanged<TimeOfDay?>?
listen field status change
finalinherited
order int?
used to support Forme.autovalidateByOrder
finalinherited
quietlyValidate bool
quietlyValidate
finalinherited
readOnly bool
finalinherited
requestFocusOnUserInteraction bool
whether request focus when field value changed
finalinherited
routeSettings RouteSettings?
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
transitionBuilder TransitionBuilder?
final
triggerBuilder FormeTimeTriggerBuilder
final
useRootNavigator bool
final
validationFilter → FormeFieldValidationFilter<TimeOfDay?>?
used to determine whether perform a validation
finalinherited
validator → FormeValidator<TimeOfDay?>?
sync validator
finalinherited

Methods

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

defaultTriggerBuilder(FormeTimeFieldState state, {InputDecoration? decoration, String formatter(TimeOfDay? time)?, bool clearButton = true}) Widget