FormBuilderTypeAhead<T> class Null safety

Text field that auto-completes user input from a list of items

Inheritance

Constructors

FormBuilderTypeAhead({Key? key, required String name, FormFieldValidator<T>? validator, T? initialValue, InputDecoration decoration = const InputDecoration(), ValueChanged<T?>? onChanged, ValueTransformer<T?>? valueTransformer, bool enabled = true, FormFieldSetter<T>? onSaved, AutovalidateMode autovalidateMode = AutovalidateMode.disabled, VoidCallback? onReset, FocusNode? focusNode, required ItemBuilder<T> itemBuilder, required SuggestionsCallback<T> suggestionsCallback, bool getImmediateSuggestions = false, SelectionToTextTransformer<T>? selectionToTextTransformer, ErrorBuilder? errorBuilder, WidgetBuilder? noItemsFoundBuilder, WidgetBuilder? loadingBuilder, Duration debounceDuration = const Duration(milliseconds: 300), SuggestionsBoxDecoration suggestionsBoxDecoration = const SuggestionsBoxDecoration(), double suggestionsBoxVerticalOffset = 5.0, TextFieldConfiguration textFieldConfiguration = const TextFieldConfiguration(), AnimationTransitionBuilder? transitionBuilder, Duration animationDuration = const Duration(milliseconds: 500), double animationStart = 0.25, AxisDirection direction = AxisDirection.down, bool hideOnLoading = false, bool hideOnEmpty = false, bool hideOnError = false, bool hideSuggestionsOnKeyboardHide = true, bool keepSuggestionsOnLoading = true, bool autoFlipDirection = false, SuggestionsBoxController? suggestionsBoxController, bool keepSuggestionsOnSuggestionSelected = false, SuggestionSelectionCallback<T>? onSuggestionSelected, TextEditingController? controller, bool hideKeyboard = false, ScrollController? scrollController})
Creates text field that auto-completes user input from a list of items

Properties

animationDuration Duration
The duration that transitionBuilder animation takes. [...]
final
animationStart double
The value at which the transitionBuilder animation starts. [...]
final
autoFlipDirection bool
If set to true, in the case where the suggestions box has less than _SuggestionsBoxController.minOverlaySpace to grow in the desired direction, the direction axis will be temporarily flipped if there's more room available in the opposite direction. [...]
final
autovalidate bool
Used to enable/disable auto validation and update their error text.
@Deprecated('Use autovalidateMode parameter which provides more specific ' 'behavior related to auto validation. ' 'This feature was deprecated after v1.19.0.'), final, inherited
autovalidateMode AutovalidateMode
Used to enable/disable this form field auto validation and update its error text. [...]
final, inherited
builder FormFieldBuilder<T>
Function that returns the widget representing this form field. It is passed the form field state as input, containing the current value and validation state of this field.
final, inherited
controller TextEditingController?
Controls the text being edited. [...]
final
debounceDuration Duration
The duration to wait after the user stops typing before calling suggestionsCallback [...]
final
decoration InputDecoration
The border, labels, icons, and styles used to decorate the field.
final, inherited
direction AxisDirection
Determine the SuggestionBox's direction. [...]
final
enabled bool
Whether the form is able to receive user input. [...]
final, inherited
errorBuilder ErrorBuilder?
Called when suggestionsCallback throws an exception. [...]
final
focusNode FocusNode?
An optional focus node to use as the focus node for this widget. [...]
final, inherited
getImmediateSuggestions bool
If set to true, suggestions will be fetched immediately when the field is added to the view. [...]
final
hashCode int
The hash code for this object. [...]
@nonVirtual, read-only, inherited
hideKeyboard bool
final
hideOnEmpty bool
If set to true, nothing will be shown if there are no results. noItemsFoundBuilder will also be ignored. [...]
final
hideOnError bool
If set to true, nothing will be shown if there is an error. errorBuilder will also be ignored. [...]
final
hideOnLoading bool
If set to true, no loading box will be shown while suggestions are being fetched. loadingBuilder will also be ignored. [...]
final
hideSuggestionsOnKeyboardHide bool
If set to false, the suggestions box will stay opened after the keyboard is closed. [...]
final
initialValue → T?
An optional value to initialize the form field to, or null otherwise.
final, inherited
itemBuilder ItemBuilder<T>
Called for each suggestion returned by suggestionsCallback to build the corresponding widget. [...]
final
keepSuggestionsOnLoading bool
If set to false, the suggestions box will show a circular progress indicator when retrieving suggestions. [...]
final
keepSuggestionsOnSuggestionSelected bool
If set to true, the suggestions box will remain opened even after selecting a suggestion. [...]
final
key Key?
Controls how one widget replaces another widget in the tree. [...]
final, inherited
loadingBuilder WidgetBuilder?
Called when waiting for suggestionsCallback to return. [...]
final
name String
Used to reference the field within the form, or to reference form data after the form is submitted.
final, inherited
noItemsFoundBuilder WidgetBuilder?
Called when suggestionsCallback returns an empty array. [...]
final
onChanged ValueChanged<T?>?
Called when the field value is changed.
final, inherited
onReset VoidCallback?
Called when the field value is reset.
final, inherited
onSaved FormFieldSetter<T>?
An optional method to call with the final value when the form is saved via FormState.save.
final, inherited
onSuggestionSelected SuggestionSelectionCallback<T>?
Called when a suggestion is tapped. [...]
final
restorationId String?
Restoration ID to save and restore the state of the form field. [...]
final, inherited
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited
scrollController ScrollController?
final
selectionToTextTransformer SelectionToTextTransformer<T>?
final
suggestionsBoxController SuggestionsBoxController?
Used to control the _SuggestionsBox. Allows manual control to open, close, toggle, or resize the _SuggestionsBox.
final
suggestionsBoxDecoration SuggestionsBoxDecoration
The decoration of the material sheet that contains the suggestions. [...]
final
suggestionsBoxVerticalOffset double
How far below the text field should the suggestions box be [...]
final
suggestionsCallback SuggestionsCallback<T>
Called with the search pattern to get the search suggestions. [...]
final
textFieldConfiguration TextFieldConfiguration
The configuration of the TextField that the TypeAhead widget displays
final
transitionBuilder AnimationTransitionBuilder?
Called to display animations when suggestionsCallback returns suggestions [...]
final
validator FormFieldValidator<T>?
An optional method that validates an input. Returns an error string to display if the input is invalid, or null otherwise. [...]
final, inherited
valueTransformer ValueTransformer<T?>?
Called just before field value is saved. Used to massage data just before committing the value. [...]
final, inherited

Methods

createElement() StatefulElement
Creates a StatefulElement to manage this widget's location in the tree. [...]
inherited
createState() → _FormBuilderTypeAheadState<T>
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. [...]
@protected, inherited
debugFillProperties(DiagnosticPropertiesBuilder properties) → void
Add additional properties associated with the node. [...]
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent 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. [...]
@nonVirtual, inherited