FormBuilderDateRangePicker class

Field for selecting a range of dates

Inheritance

Constructors

FormBuilderDateRangePicker({Key? key, required String name, FormFieldValidator<DateTimeRange<DateTime>>? validator, DateTimeRange<DateTime>? initialValue, InputDecoration decoration = const InputDecoration(), ValueChanged<DateTimeRange<DateTime>?>? onChanged, ValueTransformer<DateTimeRange<DateTime>?>? valueTransformer, bool enabled = true, FormFieldSetter<DateTimeRange<DateTime>>? onSaved, AutovalidateMode? autovalidateMode = AutovalidateMode.disabled, VoidCallback? onReset, FocusNode? focusNode, String? restorationId, FormFieldErrorBuilder? errorBuilder, required DateTime firstDate, required DateTime lastDate, DateFormat? format, int maxLines = 1, bool obscureText = false, TextCapitalization textCapitalization = TextCapitalization.none, EdgeInsets scrollPadding = const EdgeInsets.all(20.0), bool enableInteractiveSelection = true, MaxLengthEnforcement? maxLengthEnforcement, TextAlign textAlign = TextAlign.start, TextAlignVertical? textAlignVertical, bool autofocus = false, bool autocorrect = true, double cursorWidth = 2.0, TextInputType? keyboardType, TextStyle? style, TextEditingController? controller, TextInputAction? textInputAction, StrutStyle? strutStyle, TextDirection? textDirection, int? maxLength, VoidCallback? onEditingComplete, ValueChanged<DateTimeRange<DateTime>?>? onFieldSubmitted, List<TextInputFormatter>? inputFormatters, Radius? cursorRadius, Color? cursorColor, Brightness? keyboardAppearance, InputCounterWidgetBuilder? buildCounter, MouseCursor? mouseCursor, bool expands = false, int? minLines, bool showCursor = false, Locale? locale, String? cancelText, String? confirmText, DateTime? currentDate, String? errorFormatText, Widget pickerBuilder(BuildContext, Widget?)?, String? errorInvalidRangeText, String? errorInvalidText, String? fieldEndHintText, String? fieldEndLabelText, String? fieldStartHintText, String? fieldStartLabelText, String? helpText, DatePickerEntryMode initialEntryMode = DatePickerEntryMode.calendar, RouteSettings? routeSettings, String? saveText, bool useRootNavigator = true, bool allowClear = false, Widget? clearIcon, SelectableDayForRangePredicate? selectableDayPredicate})
Creates field for selecting a range of dates

Properties

allowClear → bool
final
autocorrect → bool
final
autofocus → bool
final
autovalidateMode → AutovalidateMode
Used to enable/disable this form field auto validation and update its error text.
finalinherited
buildCounter → InputCounterWidgetBuilder?
final
builder → FormFieldBuilder<DateTimeRange<DateTime>>
Function that returns the widget representing this form field.
finalinherited
cancelText → String?
final
clearIcon → Widget?
final
confirmText → String?
final
controller → TextEditingController?
final
currentDate → DateTime?
final
cursorColor → Color?
final
cursorRadius → Radius?
final
cursorWidth → double
final
decoration → InputDecoration
finalinherited
enabled → bool
Whether the form is able to receive user input.
finalinherited
enableInteractiveSelection → bool
final
errorBuilder → FormFieldErrorBuilder?
Function that returns the widget representing the error to display.
finalinherited
errorFormatText → String?
final
errorInvalidRangeText → String?
final
errorInvalidText → String?
final
expands → bool
final
fieldEndHintText → String?
final
fieldEndLabelText → String?
final
fieldStartHintText → String?
final
fieldStartLabelText → String?
final
firstDate → DateTime
final
focusNode → FocusNode?
An optional focus node to use as the focus node for this widget.
finalinherited
forceErrorText → String?
An optional property that forces the FormFieldState into an error state by directly setting the FormFieldState.errorText property without running the validator function.
finalinherited
format → DateFormat?
final
hashCode → int
The hash code for this object.
no setterinherited
helpText → String?
final
initialEntryMode → DatePickerEntryMode
final
initialValue → DateTimeRange<DateTime>?
An optional value to initialize the form field to, or null otherwise.
finalinherited
inputFormatters → List<TextInputFormatter>?
final
key → Key?
Controls how one widget replaces another widget in the tree.
finalinherited
keyboardAppearance → Brightness?
final
keyboardType → TextInputType?
final
lastDate → DateTime
final
locale → Locale?
final
maxLength → int?
final
maxLengthEnforcement → MaxLengthEnforcement?
final
maxLines → int
final
minLines → int?
final
mouseCursor → MouseCursor?
final
name → String
Used to reference the field within the form, or to reference form data after the form is submitted.
finalinherited
obscureText → bool
final
onChanged → ValueChanged<DateTimeRange<DateTime>?>?
Called when the field value is changed.
finalinherited
onEditingComplete → VoidCallback?
final
onFieldSubmitted → ValueChanged<DateTimeRange<DateTime>?>?
final
onReset → VoidCallback?
An optional method to call when the form field is reset via FormFieldState.reset.
finalinherited
onSaved → ValueChanged<DateTimeRange<DateTime>?>?
An optional method to call with the final value when the form is saved via FormState.save.
finalinherited
pickerBuilder → Widget Function(BuildContext, Widget?)?
final
restorationId → String?
Restoration ID to save and restore the state of the form field.
finalinherited
routeSettings → RouteSettings?
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
saveText → String?
final
scrollPadding → EdgeInsets
final
selectableDayPredicate → SelectableDayForRangePredicate?
final
showCursor → bool
final
strutStyle → StrutStyle?
final
style → TextStyle?
final
textAlign → TextAlign
final
textAlignVertical → TextAlignVertical?
final
textCapitalization → TextCapitalization
final
textDirection → TextDirection?
final
textInputAction → TextInputAction?
final
useRootNavigator → bool
final
validator → FormFieldValidator<DateTimeRange<DateTime>>?
An optional method that validates an input. Returns an error string to display if the input is invalid, or null otherwise.
finalinherited
valueTransformer → ValueTransformer<DateTimeRange<DateTime>?>?
Called just before field value is saved. Used to massage data just before committing the value.
finalinherited

Methods

createElement() → StatefulElement
Creates a StatefulElement to manage this widget's location in the tree.
inherited
createState() → FormBuilderFieldDecorationState<FormBuilderDateRangePicker, DateTimeRange<DateTime>>
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

tryFormat(DateTime date, DateFormat format) → String