FormBuilderTypeAhead<T> class Null safety

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



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


animationDuration Duration
The duration that transitionBuilder animation takes. [...]
animationStart double
The value at which the transitionBuilder animation starts. [...]
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. [...]
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. [...]
debounceDuration Duration
The duration to wait after the user stops typing before calling suggestionsCallback [...]
decoration InputDecoration
The border, labels, icons, and styles used to decorate the field.
final, inherited
direction AxisDirection
Determine the SuggestionBox's direction. [...]
enabled bool
Whether the form is able to receive user input. [...]
final, inherited
errorBuilder ErrorBuilder?
Called when suggestionsCallback throws an exception. [...]
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. [...]
hashCode int
The hash code for this object. [...]
@nonVirtual, read-only, inherited
hideKeyboard bool
hideOnEmpty bool
If set to true, nothing will be shown if there are no results. noItemsFoundBuilder will also be ignored. [...]
hideOnError bool
If set to true, nothing will be shown if there is an error. errorBuilder will also be ignored. [...]
hideOnLoading bool
If set to true, no loading box will be shown while suggestions are being fetched. loadingBuilder will also be ignored. [...]
hideSuggestionsOnKeyboardHide bool
If set to false, the suggestions box will stay opened after the keyboard is closed. [...]
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. [...]
keepSuggestionsOnLoading bool
If set to false, the suggestions box will show a circular progress indicator when retrieving suggestions. [...]
keepSuggestionsOnSuggestionSelected bool
If set to true, the suggestions box will remain opened even after selecting a suggestion. [...]
key Key?
Controls how one widget replaces another widget in the tree. [...]
final, inherited
loadingBuilder WidgetBuilder?
Called when waiting for suggestionsCallback to return. [...]
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. [...]
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
final, inherited
onSuggestionSelected SuggestionSelectionCallback<T>?
Called when a suggestion is tapped. [...]
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?
selectionToTextTransformer SelectionToTextTransformer<T>?
suggestionsBoxController SuggestionsBoxController?
Used to control the _SuggestionsBox. Allows manual control to open, close, toggle, or resize the _SuggestionsBox.
suggestionsBoxDecoration SuggestionsBoxDecoration
The decoration of the material sheet that contains the suggestions. [...]
suggestionsBoxVerticalOffset double
How far below the text field should the suggestions box be [...]
suggestionsCallback SuggestionsCallback<T>
Called with the search pattern to get the search suggestions. [...]
textFieldConfiguration TextFieldConfiguration
The configuration of the TextField that the TypeAhead widget displays
transitionBuilder AnimationTransitionBuilder?
Called to display animations when suggestionsCallback returns suggestions [...]
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


createElement() StatefulElement
Creates a StatefulElement to manage this widget's location in the tree. [...]
createState() → _FormBuilderTypeAheadState<T>
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. [...]
@protected, inherited
debugFillProperties(DiagnosticPropertiesBuilder properties) → void
Add additional properties associated with the node. [...]
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed. [...]
toDiagnosticsNode({String? name, DiagnosticsTreeStyle? style}) DiagnosticsNode
Returns a debug representation of the object that is used by debugging tools and by DiagnosticsNode.toStringDeep. [...]
toString({DiagnosticLevel minLevel =}) String
A string representation of this object. [...]
toStringDeep({String prefixLineOne = '', String? prefixOtherLines, DiagnosticLevel minLevel = DiagnosticLevel.debug}) String
Returns a string representation of this node and its descendants. [...]
toStringShallow({String joiner = ', ', DiagnosticLevel minLevel = DiagnosticLevel.debug}) String
Returns a one-line detailed description of the object. [...]
toStringShort() String
A short, textual description of this widget.


operator ==(Object other) bool
The equality operator. [...]
@nonVirtual, inherited