FormeDateRangeField class
example
FormeDateRangeField(
validator:
FormeValidates.notNull(errorText: 'range date 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: 'DateRange Picker'),
child: Text(state.value?.toString() ?? ''),
),
);
},
name: 'dateRange',
)
- Inheritance
-
- Object
- DiagnosticableTree
- Widget
- StatefulWidget
- FormeDateRangeField
Constructors
-
FormeDateRangeField({Key? key, String? name, DateTimeRange<
DateTime> ? initialValue, FormeAsyncValidator<DateTimeRange< ? asyncValidator, Duration? asyncValidatorDebounce, AutovalidateMode? autovalidateMode, bool enabled = true, FocusNode? focusNode, FormeFieldInitialized<DateTime> ?>DateTimeRange< ? onInitialized, FormeFieldSetter<DateTime> ?>DateTimeRange< ? onSaved, FormeFieldStatusChanged<DateTime> ?>DateTimeRange< ? onStatusChanged, int? order, bool quietlyValidate = false, bool readOnly = false, bool requestFocusOnUserInteraction = true, FormeFieldValidationFilter<DateTime> ?>DateTimeRange< ? validationFilter, FormeValidator<DateTime> ?>DateTimeRange< ? validator, FormeFieldDecorator<DateTime> ?>DateTimeRange< ? decorator, String? cancelText, String? confirmText, String? errorFormatText, String? errorInvalidText, String? helpText, DatePickerEntryMode? initialEntryMode, RouteSettings? routeSettings, bool use24hFormat = false, TextDirection? textDirection, Locale? locale, Offset? anchorPoint, String? errorInvalidRangeText, String? fieldEndHintText, String? fieldEndLabelText, String? fieldStartHintText, String? fieldStartLabelText, String? saveText, TransitionBuilder? transitionBuilder, DateTime? firstDate, DateTime? lastDate, required FormeDateRangeTriggerBuilder triggerBuilder})DateTime> ?>
Properties
- anchorPoint → Offset?
-
final
-
asyncValidator
→ FormeAsyncValidator<
DateTimeRange< ?DateTime> ?> -
used to perform an async validation
finalinherited
- asyncValidatorDebounce → Duration?
-
not worked when validate manually
finalinherited
- autovalidateMode → AutovalidateMode
-
finalinherited
-
builder
→ FormeFieldBuilder<
DateTimeRange< DateTime> ?> -
finalinherited
- cancelText → String?
-
final
- confirmText → String?
-
final
-
decorator
→ FormeFieldDecorator<
DateTimeRange< ?DateTime> ?> -
used to decorate field
finalinherited
- enabled → bool
-
whether field is enabled,
finalinherited
- errorFormatText → String?
-
final
- errorInvalidRangeText → String?
-
final
- errorInvalidText → String?
-
final
- fieldEndHintText → String?
-
final
- fieldEndLabelText → String?
-
final
- fieldStartHintText → String?
-
final
- fieldStartLabelText → String?
-
final
- fieldType → Type
-
no setterinherited
- firstDate → DateTime?
-
final
- focusNode → FocusNode?
-
finalinherited
- hashCode → int
-
The hash code for this object.
no setterinherited
- helpText → String?
-
final
- initialEntryMode → DatePickerEntryMode?
-
final
-
initialValue
→ DateTimeRange<
DateTime> ? -
initial value
finalinherited
- key → Key?
-
Controls how one widget replaces another widget in the tree.
finalinherited
- lastDate → DateTime?
-
final
- locale → Locale?
-
final
- name → String?
-
field name
finalinherited
-
onInitialized
→ FormeFieldInitialized<
DateTimeRange< ?DateTime> ?> -
called immediately after
FormeFieldState.initStatusfinalinherited -
onSaved
→ FormeFieldSetter<
DateTimeRange< ?DateTime> ?> -
finalinherited
-
onStatusChanged
→ FormeFieldStatusChanged<
DateTimeRange< ?DateTime> ?> -
listen field status change
finalinherited
- order → int?
-
used to support
Forme.autovalidateByOrderfinalinherited - 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
- saveText → String?
-
final
- textDirection → TextDirection?
-
final
- transitionBuilder → TransitionBuilder?
-
final
- triggerBuilder → FormeDateRangeTriggerBuilder
-
final
- use24hFormat → bool
-
final
-
final
-
validationFilter
→ FormeFieldValidationFilter<
DateTimeRange< ?DateTime> ?> -
used to determine whether perform a validation
finalinherited
-
validator
→ FormeValidator<
DateTimeRange< ?DateTime> ?> -
sync validator
finalinherited
Methods
-
createElement(
) → StatefulElement -
Creates a StatefulElement to manage this widget's location in the tree.
inherited
-
createState(
) → FormeDateRangeFieldState - 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, 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
-
defaultTriggerBuilder(
FormeDateRangeFieldState state, {InputDecoration? decoration, String formatter(DateTimeRange< DateTime> ? time)?, bool clearButton = true}) → Widget