FormBuilderDateTimePicker class

Field for Date, Time and DateTime input

Inheritance

Constructors

FormBuilderDateTimePicker({Key? key, required String name, FormFieldValidator<DateTime>? validator, DateTime? initialValue, InputDecoration decoration = const InputDecoration(), ValueChanged<DateTime?>? onChanged, ValueTransformer<DateTime?>? valueTransformer, bool enabled = true, FormFieldSetter<DateTime>? onSaved, AutovalidateMode? autovalidateMode = AutovalidateMode.disabled, VoidCallback? onReset, FocusNode? focusNode, String? restorationId, FormFieldErrorBuilder? errorBuilder, InputType inputType = InputType.both, EdgeInsets scrollPadding = const EdgeInsets.all(20.0), double cursorWidth = 2.0, bool enableInteractiveSelection = true, TimeOfDay initialTime = const TimeOfDay(hour: 12, minute: 0), TextInputType? keyboardType, TextAlign textAlign = TextAlign.start, bool autofocus = false, bool obscureText = false, bool autocorrect = true, int? maxLines = 1, bool expands = false, DatePickerMode initialDatePickerMode = DatePickerMode.day, TransitionBuilder? transitionBuilder, TextCapitalization textCapitalization = TextCapitalization.none, bool useRootNavigator = true, DatePickerEntryMode initialEntryMode = DatePickerEntryMode.calendar, TimePickerEntryMode timePickerInitialEntryMode = TimePickerEntryMode.dial, DateFormat? format, DateTime? initialDate, DateTime? firstDate, DateTime? lastDate, DateTime? currentDate, Locale? locale, int? maxLength, TextDirection? textDirection, TextAlignVertical? textAlignVertical, ValueChanged<DateTime?>? onFieldSubmitted, TextEditingController? controller, TextStyle? style, MaxLengthEnforcement maxLengthEnforcement = MaxLengthEnforcement.none, List<TextInputFormatter>? inputFormatters, bool showCursor = false, int? minLines, TextInputAction? textInputAction, VoidCallback? onEditingComplete, InputCounterWidgetBuilder? buildCounter, MouseCursor? mouseCursor, Radius? cursorRadius, Color? cursorColor, Brightness? keyboardAppearance, String? cancelText, String? confirmText, String? errorFormatText, String? errorInvalidText, String? fieldHintText, String? fieldLabelText, String? helpText, RouteSettings? routeSettings, StrutStyle? strutStyle, SelectableDayPredicate? selectableDayPredicate, Offset? anchorPoint, EntryModeChangeCallback? onEntryModeChanged, bool disablePicker = false, bool barrierDismissible = true})
Creates field for Date, Time and DateTime input

Properties

anchorPoint → Offset?
final
autocorrect → bool
final
autofocus → bool
Preset the widget's value.
final
autovalidateMode → AutovalidateMode
Used to enable/disable this form field auto validation and update its error text.
finalinherited
barrierDismissible → bool
final
buildCounter → InputCounterWidgetBuilder?
final
builder → FormFieldBuilder<DateTime>
Function that returns the widget representing this form field.
finalinherited
cancelText → String?
final
confirmText → String?
final
controller → TextEditingController?
final
currentDate → DateTime?
final
cursorColor → Color?
final
cursorRadius → Radius?
final
cursorWidth → double
final
decoration → InputDecoration
finalinherited
disablePicker → bool
If true, disables the picker so it's not shown when the field is tapped.
final
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
errorInvalidText → String?
final
expands → bool
final
fieldHintText → String?
final
fieldLabelText → String?
final
firstDate → DateTime?
The earliest choosable date. Defaults to 1900.
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?
Allow manual editing of the date/time. Defaults to true. If false, the picker(s) will be shown every time the field gains focus. For representing the date as a string e.g. DateFormat("EEEE, MMMM d, yyyy 'at' h:mma") (Sunday, June 3, 2018 at 9:24pm)
final
hashCode → int
The hash code for this object.
no setterinherited
helpText → String?
final
initialDate → DateTime?
The date the calendar opens to when displayed. Defaults to null.
final
initialDatePickerMode → DatePickerMode
Called when an enclosing form is saved. The value passed will be null if format fails to parse the text. Corresponds to the showDatePicker() parameter. Defaults to DatePickerMode.day.
final
initialEntryMode → DatePickerEntryMode
final
initialTime → TimeOfDay
The initial time prefilled in the picker dialog when it is shown. Defaults to noon. Explicitly set this to null to use the current time.
final
initialValue → DateTime?
An optional value to initialize the form field to, or null otherwise.
finalinherited
inputFormatters → List<TextInputFormatter>?
final
inputType → InputType
The date/time picker dialogs to show.
final
key → Key?
Controls how one widget replaces another widget in the tree.
finalinherited
keyboardAppearance → Brightness?
final
keyboardType → TextInputType?
final
lastDate → DateTime?
The latest choosable date. Defaults to 2100.
final
locale → Locale?
Corresponds to the showDatePicker() parameter.
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<DateTime?>?
Called when the field value is changed.
finalinherited
onEditingComplete → VoidCallback?
final
onEntryModeChanged → EntryModeChangeCallback?
final
onFieldSubmitted → ValueChanged<DateTime?>?
Called when an enclosing form is submitted. The value passed will be null if format fails to parse the text.
final
onReset → VoidCallback?
An optional method to call when the form field is reset via FormFieldState.reset.
finalinherited
onSaved → ValueChanged<DateTime?>?
An optional method to call with the final value when the form is saved via FormState.save.
finalinherited
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
scrollPadding → EdgeInsets
final
selectableDayPredicate → SelectableDayPredicate?
final
showCursor → bool
Called whenever the state's value changes, e.g. after picker value(s) have been selected or when the field loses focus. To listen for all text changes, use the controller and focusNode.
final
strutStyle → StrutStyle?
final
style → TextStyle?
final
textAlign → TextAlign
final
textAlignVertical → TextAlignVertical?
final
textCapitalization → TextCapitalization
final
textDirection → TextDirection?
Corresponds to the showDatePicker() parameter.
final
textInputAction → TextInputAction?
final
timePickerInitialEntryMode → TimePickerEntryMode
final
transitionBuilder → TransitionBuilder?
final
useRootNavigator → bool
Corresponds to the showDatePicker() parameter.
final
validator → FormFieldValidator<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<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<FormBuilderDateTimePicker, 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