FAutocomplete<T> class

An autocomplete provides a list of suggestions based on the user's input and shows typeahead text for the first match.

It is a FormField and therefore can be used in a Form widget.

Not a searchable select

An autocomplete is not a searchable select. it is a text-field with suggestions. Values are not limited to one of suggestions, users can type anything. If you need a searchable select, use FSelect.search or FMultiSelect.search instead.

See:

Inheritance
Mixed-in types

Constructors

FAutocomplete({required Map<String, T> items, String format(T suggestion)?, T? parse(String? text)?, FAutocompleteControl control = const .managed(), FPopoverControl popoverControl = const .managed(), FTextFieldSizeVariant size = .md, FAutocompleteStyleDelta style = const .context(), Widget? label, String? hint, Widget? description, TextMagnifierConfiguration? magnifierConfiguration, Object groupId = EditableText, FocusNode? focusNode, TextInputType? keyboardType, TextInputAction? textInputAction, TextCapitalization textCapitalization = .none, TextAlign textAlign = .start, TextAlignVertical? textAlignVertical, TextDirection? textDirection, VoidCallback? contentOnTapHide, bool autofocus = false, String obscuringCharacter = '•', bool obscureText = false, bool autocorrect = true, SmartDashesType? smartDashesType, SmartQuotesType? smartQuotesType, bool enableAutocompletion = true, bool enableSuggestions = true, int? minLines, int? maxLines = 1, bool expands = false, bool readOnly = false, bool? showCursor, int? maxLength, MaxLengthEnforcement? maxLengthEnforcement, bool onTapAlwaysCalled = false, VoidCallback? onEditingComplete, ValueChanged<String>? onSubmit, AppPrivateCommandCallback? onAppPrivateCommand, List<TextInputFormatter>? inputFormatters, bool enabled = true, bool? ignorePointers, bool enableInteractiveSelection = true, TextSelectionControls? selectionControls, DragStartBehavior dragStartBehavior = .start, MouseCursor? mouseCursor, FTextFieldCounterBuilder? counterBuilder, ScrollPhysics? scrollPhysics, ScrollController? scrollController, Iterable<String>? autofillHints, String? restorationId, bool stylusHandwritingEnabled = true, bool enableIMEPersonalizedLearning = true, ContentInsertionConfiguration? contentInsertionConfiguration, EditableTextContextMenuBuilder? contextMenuBuilder = FTextField.defaultContextMenuBuilder, bool canRequestFocus = true, UndoHistoryController? undoController, SpellCheckConfiguration? spellCheckConfiguration, FFieldIconBuilder<FAutocompleteStyle>? prefixBuilder, FFieldIconBuilder<FAutocompleteStyle>? suffixBuilder, bool clearable(TextEditingValue value) = FTextField.defaultClearable, FFieldClearIconBuilder<FAutocompleteFieldStyle> clearIconBuilder = FTextField.defaultClearIconBuilder, FAutocompletePopoverBuilder popoverBuilder = FPopover.defaultPopoverBuilder, FormFieldSetter<T>? onSaved, VoidCallback? onReset, FormFieldValidator<T>? validator, AutovalidateMode autovalidateMode = .disabled, String? forceErrorText, Widget errorBuilder(BuildContext context, String message) = FFormFieldProperties.defaultErrorBuilder, AlignmentGeometry contentAnchor = .topStart, AlignmentGeometry fieldAnchor = .bottomStart, FPortalConstraints contentConstraints = const FAutoWidthPortalConstraints(maxHeight: 300), FPortalSpacing contentSpacing = const .spacing(4), FPortalOverflow contentOverflow = .flip, Offset contentOffset = .zero, bool contentUseViewPadding = true, bool contentUseViewInsets = true, OverlayChildLocation contentOverlayLocation = .nearestOverlay, FPopoverHideRegion contentHideRegion = .excludeChild, Object? contentGroupId, bool contentCutout = true, void contentCutoutBuilder(Path path, Rect bounds) = FModalBarrier.defaultCutoutBuilder, bool autoHide = true, bool? retainFocus, FFieldBuilder<FAutocompleteStyle> builder = FTextField.defaultBuilder, bool rightArrowToComplete = false, FutureOr<Iterable<T>> filter(String query)?, FAutocompleteContentBuilder<T>? contentBuilder, ScrollController? contentScrollController, ScrollPhysics contentPhysics = const ClampingScrollPhysics(), FItemDivider contentDivider = .none, Widget contentEmptyBuilder(BuildContext context, FAutocompleteContentStyle style)? = defaultContentEmptyBuilder, Widget contentLoadingBuilder(BuildContext context, FAutocompleteContentStyle style)? = defaultContentLoadingBuilder, Widget contentErrorBuilder(BuildContext context, FAutocompleteContentStyle style, Object? error, StackTrace stackTrace)? = defaultContentErrorBuilder, ValueChanged<T>? onItemPress, Key? key})
Creates a FAutocomplete from the given items.
FAutocomplete.builder({required FutureOr<Iterable<T>> filter(String text), required String format(T suggestion), required T? parse(String? text), required FAutocompleteContentBuilder<T> contentBuilder, FAutocompleteControl control = const .managed(), FPopoverControl popoverControl = const .managed(), FTextFieldSizeVariant size = .md, FAutocompleteStyleDelta style = const .context(), Widget? label, String? hint, Widget? description, TextMagnifierConfiguration? magnifierConfiguration, Object groupId = EditableText, FocusNode? focusNode, TextInputType? keyboardType, TextInputAction? textInputAction, TextCapitalization textCapitalization = .none, TextAlign textAlign = .start, TextAlignVertical? textAlignVertical, TextDirection? textDirection, VoidCallback? contentOnTapHide, bool autofocus = false, String obscuringCharacter = '•', bool obscureText = false, bool autocorrect = true, SmartDashesType? smartDashesType, SmartQuotesType? smartQuotesType, bool enableAutocompletion = true, bool enableSuggestions = true, int? minLines, int? maxLines = 1, bool expands = false, bool readOnly = false, bool? showCursor, int? maxLength, MaxLengthEnforcement? maxLengthEnforcement, bool onTapAlwaysCalled = false, VoidCallback? onEditingComplete, ValueChanged<String>? onSubmit, AppPrivateCommandCallback? onAppPrivateCommand, List<TextInputFormatter>? inputFormatters, bool enabled = true, bool? ignorePointers, bool enableInteractiveSelection = true, TextSelectionControls? selectionControls, DragStartBehavior dragStartBehavior = .start, MouseCursor? mouseCursor, FTextFieldCounterBuilder? counterBuilder, ScrollPhysics? scrollPhysics, ScrollController? scrollController, Iterable<String>? autofillHints, String? restorationId, bool stylusHandwritingEnabled = true, bool enableIMEPersonalizedLearning = true, ContentInsertionConfiguration? contentInsertionConfiguration, EditableTextContextMenuBuilder? contextMenuBuilder = FTextField.defaultContextMenuBuilder, bool canRequestFocus = true, UndoHistoryController? undoController, SpellCheckConfiguration? spellCheckConfiguration, FFieldIconBuilder<FAutocompleteStyle>? prefixBuilder, FFieldIconBuilder<FAutocompleteStyle>? suffixBuilder, bool clearable(TextEditingValue value) = FTextField.defaultClearable, FFieldClearIconBuilder<FAutocompleteFieldStyle> clearIconBuilder = FTextField.defaultClearIconBuilder, FAutocompletePopoverBuilder popoverBuilder = FPopover.defaultPopoverBuilder, FormFieldSetter<T>? onSaved, VoidCallback? onReset, FormFieldValidator<T>? validator, AutovalidateMode autovalidateMode = .disabled, String? forceErrorText, Widget errorBuilder(BuildContext context, String message) = FFormFieldProperties.defaultErrorBuilder, AlignmentGeometry contentAnchor = .topStart, AlignmentGeometry fieldAnchor = .bottomStart, FPortalConstraints contentConstraints = const FAutoWidthPortalConstraints(maxHeight: 300), FPortalSpacing contentSpacing = const .spacing(4), FPortalOverflow contentOverflow = .flip, Offset contentOffset = .zero, bool contentUseViewPadding = true, bool contentUseViewInsets = true, OverlayChildLocation contentOverlayLocation = .nearestOverlay, FPopoverHideRegion contentHideRegion = .excludeChild, Object? contentGroupId, bool contentCutout = true, void contentCutoutBuilder(Path path, Rect bounds) = FModalBarrier.defaultCutoutBuilder, bool autoHide = true, bool? retainFocus, FFieldBuilder<FAutocompleteStyle> builder = FTextField.defaultBuilder, bool rightArrowToComplete = false, ScrollController? contentScrollController, ScrollPhysics contentPhysics = const ClampingScrollPhysics(), FItemDivider contentDivider = .none, Widget contentEmptyBuilder(BuildContext context, FAutocompleteContentStyle style)? = defaultContentEmptyBuilder, Widget contentLoadingBuilder(BuildContext context, FAutocompleteContentStyle style)? = defaultContentLoadingBuilder, Widget contentErrorBuilder(BuildContext context, FAutocompleteContentStyle style, Object? error, StackTrace stackTrace)? = defaultContentErrorBuilder, ValueChanged<T>? onItemPress, Key? key})
Creates a FAutocomplete that uses the given filter to determine the results and the contentBuilder to build the content.
const

Properties

autocorrect → bool
Whether to enable autocorrection. Defaults to true.
final
autofillHints → Iterable<String>?
A list of strings that helps the autofill service identify the type of this text input.
final
autofocus → bool
Whether this text field should focus itself if nothing else is already focused. Defaults to false.
final
autoHide → bool
True if the content should be automatically hidden after an item is selected. Defaults to false.
final
autovalidateMode → AutovalidateMode
Used to enable/disable this form field's auto validation and update its error text.
final
builder → FFieldBuilder<FAutocompleteStyle>
The builder used to decorate the autocomplete. It should always use the given child.
final
canRequestFocus → bool
Determine whether this text field can request the primary focus.
final
clearable → bool Function(TextEditingValue value)
A predicate that returns true if a clear icon should be shown at the end when the text field is not empty.
final
clearIconBuilder → FFieldClearIconBuilder<FAutocompleteFieldStyle>
The builder used to build the clear icon when clearable returns true.
final
contentAnchor → AlignmentGeometry
The alignment point on the content popover. Defaults to AlignmentGeometry.topStart.
final
contentBuilder → FAutocompleteContentBuilder<T>
A callback builds the list of items based on search results returned by filter.
final
contentConstraints → FPortalConstraints
The constraints to apply to the content popover. Defaults to const FAutoWidthPortalConstraints(maxHeight: 300).
final
contentCutout → bool
Whether the barrier should exclude the builder/child's area using a non-interactive cutout.
final
contentCutoutBuilder → void Function(Path path, Rect bounds)
An optional callback that customizes the cutout shape.
final
contentDivider → FItemDivider
The divider used to separate the content items. Defaults to FItemDivider.none.
final
contentEmptyBuilder → Widget Function(BuildContext context, FAutocompleteContentStyle style)?
The builder that is called when the select is empty. Defaults to defaultContentEmptyBuilder.
final
contentErrorBuilder → Widget Function(BuildContext context, FAutocompleteContentStyle style, Object? error, StackTrace stackTrace)?
A callback that is used to show an error message when filter is asynchronous and fails. Defaults to defaultContentErrorBuilder.
final
contentGroupId → Object?
An optional group ID that groups TapRegions together so that they operate as one region. If a tap occurs outside of all group members, then group members that are shown will be hidden.
final
contentHideRegion → FPopoverHideRegion
The region that can be tapped to hide the popover.
final
contentInsertionConfiguration → ContentInsertionConfiguration?
Configuration of handler for media content inserted via the system input method.
final
contentLoadingBuilder → Widget Function(BuildContext context, FAutocompleteContentStyle style)?
A callback that is used to show a loading indicator while the results is processed.
final
contentOffset → Offset
Additional translation to apply to the popover's position.
final
contentOnTapHide → VoidCallback?
A callback that is called when the popover is hidden by tapping outside of it.
final
contentOverflow → FPortalOverflow
The callback used to shift a popover when it overflows out of the viewport.
final
contentOverlayLocation → OverlayChildLocation
The Overlay that the portal is attached to.
final
contentPhysics → ScrollPhysics
The content's scroll physics. Defaults to ClampingScrollPhysics.
final
contentScrollController → ScrollController?
The content's scroll controller.
final
contentSpacing → FPortalSpacing
The spacing between the popover and child anchors.
final
contentUseViewInsets → bool
Whether to avoid the platform view's insets (the soft keyboard).
final
contentUseViewPadding → bool
Whether to avoid the platform view's padding (static safe areas like the notch and status bar).
final
contextMenuBuilder → EditableTextContextMenuBuilder?
Builds the text selection toolbar when requested by the user.
final
control → FAutocompleteControl
Defines how the autocomplete's state is controlled.
final
counterBuilder → FTextFieldCounterBuilder?
The FTextFieldCounterBuilder used to build a custom counter for the text field.
final
description → Widget?
The description text.
final
dragStartBehavior → DragStartBehavior
Determines the way that drag start behavior is handled. By default, the drag start behavior is DragStartBehavior.start.
final
enableAutocompletion → bool
Whether the autocomplete shows inline typeahead and the suggestions popover. Defaults to true.
final
enabled → bool
If false the text field is "disabled": it ignores taps. Defaults to true.
final
enableIMEPersonalizedLearning → bool
Whether to enable that the IME update personalized data such as typing history and user dictionary data.
final
enableInteractiveSelection → bool
Whether to enable user interface affordances for changing the text selection. Defaults to true.
final
enableSuggestions → bool
Whether to show input suggestions as the user types. Defaults to true.
final
errorBuilder → Widget Function(BuildContext context, String message)
The builder for errors displayed below the description. Defaults to displaying the error message.
final
expands → bool
Whether this widget's height will be sized to fill its widget. Defaults to false.
final
fieldAnchor → AlignmentGeometry
The alignment point on the select's field. Defaults to AlignmentGeometry.bottomStart.
final
filter → FutureOr<Iterable<T>> Function(String text)
A callback that produces a list of items based on the query either synchronously or asynchronously.
final
focusNode → FocusNode?
Defines the keyboard focus for this FTextField.
final
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.
final
format → String Function(T suggestion)
Converts a value into a full inline completion.
final
groupId → Object
The group identifier for the TextFieldTapRegion of this text field.
final
hashCode → int
The hash code for this object.
no setterinherited
hint → String?
The text to display when the text field is empty.
final
ignorePointers → bool?
Determines whether this widget ignores pointer events. Defaults to null, and when null, does nothing.
final
inputFormatters → List<TextInputFormatter>?
Optional input validation and formatting overrides.
final
key → Key?
Controls how one widget replaces another widget in the tree.
finalinherited
keyboardType → TextInputType?
The type of keyboard to use for editing the text. Defaults to TextInputType.text if maxLines is one and TextInputType.multiline otherwise.
final
label → Widget?
A builder that creates a widget to display validation errors.
final
magnifierConfiguration → TextMagnifierConfiguration?
The configuration for the magnifier of this text field.
final
maxLength → int?
The maximum number of characters (Unicode grapheme clusters) to allow in the text field.
final
maxLengthEnforcement → MaxLengthEnforcement?
Determines how the maxLength limit should be enforced.
final
maxLines → int?
The maximum number of lines to show at one time, wrapping if necessary.
final
minLines → int?
The minimum number of lines to occupy when the content spans fewer lines.
final
mouseCursor → MouseCursor?
The cursor for a mouse pointer when it enters or is hovering over the widget.
final
obscureText → bool
Whether to hide the text being edited (e.g., for passwords). Defaults to false.
final
obscuringCharacter → String
Character used for obscuring text if obscureText is true.
final
onAppPrivateCommand → AppPrivateCommandCallback?
This is used to receive a private command from the input method.
final
onEditingComplete → VoidCallback?
Called when the user submits editable content (e.g., user presses the "done" button on the keyboard).
final
onItemPress → ValueChanged<T>?
Called when the user selects an item from the popover suggestions.
final
onReset → VoidCallback?
An optional method to call when the form field is reset via FormFieldState.reset.
final
onSaved → FormFieldSetter<T>?
An optional method to call with the final value when the form is saved via FormState.save.
final
onSubmit → ValueChanged<String>?
Called when the user indicates that they are done editing the text in the field.
final
onTapAlwaysCalled → bool
Called for the first tap in a series of taps.
final
parse → T? Function(String? text)
Converts the current text into a T.
final
popoverBuilder → FAutocompletePopoverBuilder
A builder that wraps the entire popover content with arbitrary widgets.
final
popoverControl → FPopoverControl
Defines how the autocomplete's popover content is controlled.
final
prefixBuilder → FFieldIconBuilder<FAutocompleteStyle>?
The prefix's builder.
final
readOnly → bool
Whether the text can be changed. Defaults to false.
final
restorationId → String?
Restoration ID to save and restore the state of the text field.
final
retainFocus → bool?
Whether the field should retain focus after a suggestion is tapped.
final
rightArrowToComplete → bool
Whether the autocomplete should complete the text when a completion is available and the user presses right arrow. Defaults to false.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
scrollController → ScrollController?
The ScrollController to use when vertically scrolling the input. If null, it will instantiate a new ScrollController.
final
scrollPhysics → ScrollPhysics?
The ScrollPhysics to use when vertically scrolling the input. If not specified, it will behave according to the current platform.
final
selectionControls → TextSelectionControls?
Optional delegate for building the text selection handles.
final
showCursor → bool?
Whether to show cursor.
final
size → FTextFieldSizeVariant
The text field's size variant. Defaults to FTextFieldSizeVariant.md.
final
smartDashesType → SmartDashesType?
Whether to allow the platform to automatically format dashes.
final
smartQuotesType → SmartQuotesType?
Whether to allow the platform to automatically format quotes.
final
spellCheckConfiguration → SpellCheckConfiguration?
Configuration that details how spell check should be performed.
final
style → FAutocompleteStyleDelta
The style.
final
stylusHandwritingEnabled → bool
Whether this input supports stylus handwriting, where the user can write directly on top of a field.
final
suffixBuilder → FFieldIconBuilder<FAutocompleteStyle>?
The suffix's builder.
final
textAlign → TextAlign
How the text should be aligned horizontally.
final
textAlignVertical → TextAlignVertical?
How the text should be aligned vertically.
final
textCapitalization → TextCapitalization
Configures how the platform keyboard will select an uppercase or lowercase keyboard. Defaults to TextCapitalization.none.
final
textDirection → TextDirection?
The directionality of the text. Defaults to the ambient Directionality, if any.
final
textInputAction → TextInputAction?
The type of action button to use for the keyboard.
final
undoController → UndoHistoryController?
Controls the undo state.
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

Methods

createElement() → StatefulElement
Creates a StatefulElement to manage this widget's location in the tree.
inherited
createState() → State<FAutocomplete<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.
inherited
debugFillProperties(DiagnosticPropertiesBuilder properties) → void
Add additional properties associated with the node.
override
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

defaultContentEmptyBuilder(BuildContext context, FAutocompleteContentStyle style) → Widget
The default empty builder that shows a localized message when there are no results.
defaultContentErrorBuilder(BuildContext context, FAutocompleteContentStyle style, Object? error, StackTrace stackTrace) → Widget
The default error builder that shows the error message when filter fails.
defaultContentLoadingBuilder(BuildContext _, FAutocompleteContentStyle style) → Widget
The default loading builder that shows a spinner when an asynchronous search is pending.
text({required List<String> items, FAutocompleteControl control = const .managed(), FPopoverControl popoverControl = const .managed(), FTextFieldSizeVariant size = .md, FAutocompleteStyleDelta style = const .context(), Widget? label, String? hint, Widget? description, TextMagnifierConfiguration? magnifierConfiguration, Object groupId = EditableText, FocusNode? focusNode, TextInputType? keyboardType, TextInputAction? textInputAction, TextCapitalization textCapitalization = .none, TextAlign textAlign = .start, TextAlignVertical? textAlignVertical, TextDirection? textDirection, VoidCallback? contentOnTapHide, bool autofocus = false, String obscuringCharacter = '•', bool obscureText = false, bool autocorrect = true, SmartDashesType? smartDashesType, SmartQuotesType? smartQuotesType, bool enableAutocompletion = true, bool enableSuggestions = true, int? minLines, int? maxLines = 1, bool expands = false, bool readOnly = false, bool? showCursor, int? maxLength, MaxLengthEnforcement? maxLengthEnforcement, bool onTapAlwaysCalled = false, VoidCallback? onEditingComplete, ValueChanged<String>? onSubmit, AppPrivateCommandCallback? onAppPrivateCommand, List<TextInputFormatter>? inputFormatters, bool enabled = true, bool? ignorePointers, bool enableInteractiveSelection = true, TextSelectionControls? selectionControls, DragStartBehavior dragStartBehavior = .start, MouseCursor? mouseCursor, FTextFieldCounterBuilder? counterBuilder, ScrollPhysics? scrollPhysics, ScrollController? scrollController, Iterable<String>? autofillHints, String? restorationId, bool stylusHandwritingEnabled = true, bool enableIMEPersonalizedLearning = true, ContentInsertionConfiguration? contentInsertionConfiguration, EditableTextContextMenuBuilder? contextMenuBuilder = FTextField.defaultContextMenuBuilder, bool canRequestFocus = true, UndoHistoryController? undoController, SpellCheckConfiguration? spellCheckConfiguration, FFieldIconBuilder<FAutocompleteStyle>? prefixBuilder, FFieldIconBuilder<FAutocompleteStyle>? suffixBuilder, bool clearable(TextEditingValue value) = FTextField.defaultClearable, FFieldClearIconBuilder<FAutocompleteFieldStyle> clearIconBuilder = FTextField.defaultClearIconBuilder, FAutocompletePopoverBuilder popoverBuilder = FPopover.defaultPopoverBuilder, FormFieldSetter<String>? onSaved, VoidCallback? onReset, FormFieldValidator<String>? validator, AutovalidateMode autovalidateMode = .disabled, String? forceErrorText, Widget errorBuilder(BuildContext context, String message) = FFormFieldProperties.defaultErrorBuilder, AlignmentGeometry contentAnchor = .topStart, AlignmentGeometry fieldAnchor = .bottomStart, FPortalConstraints contentConstraints = const FAutoWidthPortalConstraints(maxHeight: 300), FPortalSpacing contentSpacing = const .spacing(4), FPortalOverflow contentOverflow = .flip, Offset contentOffset = .zero, bool contentUseViewPadding = true, bool contentUseViewInsets = true, OverlayChildLocation contentOverlayLocation = .nearestOverlay, FPopoverHideRegion contentHideRegion = .excludeChild, Object? contentGroupId, bool contentCutout = true, void contentCutoutBuilder(Path path, Rect bounds) = FModalBarrier.defaultCutoutBuilder, bool autoHide = true, bool? retainFocus, FFieldBuilder<FAutocompleteStyle> builder = FTextField.defaultBuilder, bool rightArrowToComplete = false, FutureOr<Iterable<String>> filter(String query)?, FAutocompleteContentBuilder<String>? contentBuilder, ScrollController? contentScrollController, ScrollPhysics contentPhysics = const ClampingScrollPhysics(), FItemDivider contentDivider = .none, Widget contentEmptyBuilder(BuildContext context, FAutocompleteContentStyle style)? = defaultContentEmptyBuilder, Widget contentLoadingBuilder(BuildContext context, FAutocompleteContentStyle style)? = defaultContentLoadingBuilder, Widget contentErrorBuilder(BuildContext context, FAutocompleteContentStyle style, Object? error, StackTrace stackTrace)? = defaultContentErrorBuilder, ValueChanged<String>? onItemPress, Key? key}) → FAutocomplete<String>
Creates a FAutocomplete for String suggestions from the given items, with identity format and parse.
textBuilder({required FutureOr<Iterable<String>> filter(String query), required FAutocompleteContentBuilder<String> contentBuilder, FAutocompleteControl control = const .managed(), FPopoverControl popoverControl = const .managed(), FTextFieldSizeVariant size = .md, FAutocompleteStyleDelta style = const .context(), Widget? label, String? hint, Widget? description, TextMagnifierConfiguration? magnifierConfiguration, Object groupId = EditableText, FocusNode? focusNode, TextInputType? keyboardType, TextInputAction? textInputAction, TextCapitalization textCapitalization = .none, TextAlign textAlign = .start, TextAlignVertical? textAlignVertical, TextDirection? textDirection, VoidCallback? contentOnTapHide, bool autofocus = false, String obscuringCharacter = '•', bool obscureText = false, bool autocorrect = true, SmartDashesType? smartDashesType, SmartQuotesType? smartQuotesType, bool enableAutocompletion = true, bool enableSuggestions = true, int? minLines, int? maxLines = 1, bool expands = false, bool readOnly = false, bool? showCursor, int? maxLength, MaxLengthEnforcement? maxLengthEnforcement, bool onTapAlwaysCalled = false, VoidCallback? onEditingComplete, ValueChanged<String>? onSubmit, AppPrivateCommandCallback? onAppPrivateCommand, List<TextInputFormatter>? inputFormatters, bool enabled = true, bool? ignorePointers, bool enableInteractiveSelection = true, TextSelectionControls? selectionControls, DragStartBehavior dragStartBehavior = .start, MouseCursor? mouseCursor, FTextFieldCounterBuilder? counterBuilder, ScrollPhysics? scrollPhysics, ScrollController? scrollController, Iterable<String>? autofillHints, String? restorationId, bool stylusHandwritingEnabled = true, bool enableIMEPersonalizedLearning = true, ContentInsertionConfiguration? contentInsertionConfiguration, EditableTextContextMenuBuilder? contextMenuBuilder = FTextField.defaultContextMenuBuilder, bool canRequestFocus = true, UndoHistoryController? undoController, SpellCheckConfiguration? spellCheckConfiguration, FFieldIconBuilder<FAutocompleteStyle>? prefixBuilder, FFieldIconBuilder<FAutocompleteStyle>? suffixBuilder, bool clearable(TextEditingValue value) = FTextField.defaultClearable, FFieldClearIconBuilder<FAutocompleteFieldStyle> clearIconBuilder = FTextField.defaultClearIconBuilder, FAutocompletePopoverBuilder popoverBuilder = FPopover.defaultPopoverBuilder, FormFieldSetter<String>? onSaved, VoidCallback? onReset, FormFieldValidator<String>? validator, AutovalidateMode autovalidateMode = .disabled, String? forceErrorText, Widget errorBuilder(BuildContext context, String message) = FFormFieldProperties.defaultErrorBuilder, AlignmentGeometry contentAnchor = .topStart, AlignmentGeometry fieldAnchor = .bottomStart, FPortalConstraints contentConstraints = const FAutoWidthPortalConstraints(maxHeight: 300), FPortalSpacing contentSpacing = const .spacing(4), FPortalOverflow contentOverflow = .flip, Offset contentOffset = .zero, bool contentUseViewPadding = true, bool contentUseViewInsets = true, OverlayChildLocation contentOverlayLocation = .nearestOverlay, FPopoverHideRegion contentHideRegion = .excludeChild, Object? contentGroupId, bool contentCutout = true, void contentCutoutBuilder(Path path, Rect bounds) = FModalBarrier.defaultCutoutBuilder, bool autoHide = true, bool? retainFocus, FFieldBuilder<FAutocompleteStyle> builder = FTextField.defaultBuilder, bool rightArrowToComplete = false, ScrollController? contentScrollController, ScrollPhysics contentPhysics = const ClampingScrollPhysics(), FItemDivider contentDivider = .none, Widget contentEmptyBuilder(BuildContext context, FAutocompleteContentStyle style)? = defaultContentEmptyBuilder, Widget contentLoadingBuilder(BuildContext context, FAutocompleteContentStyle style)? = defaultContentLoadingBuilder, Widget contentErrorBuilder(BuildContext context, FAutocompleteContentStyle style, Object? error, StackTrace stackTrace)? = defaultContentErrorBuilder, ValueChanged<String>? onItemPress, Key? key}) → FAutocomplete<String>
Creates a FAutocomplete for String suggestions that uses the given filter and contentBuilder, with identity format and parse.