RawTypeAheadField<T> class abstract

A widget that shows suggestions above a text field while the user is typing.

This is the base class for the Material and Cupertino versions of the widget. You may use this class if you want to create your own version of the widget.

Inheritance
Implementers

Constructors

RawTypeAheadField({Key? key, Duration? animationDuration = const Duration(milliseconds: 200), bool autoFlipDirection = false, double autoFlipMinHeight = 144, required TextFieldBuilder builder, TextEditingController? controller, Duration? debounceDuration = const Duration(milliseconds: 300), VerticalDirection? direction = VerticalDirection.down, required SuggestionsErrorBuilder errorBuilder, FocusNode? focusNode, bool? hideKeyboardOnDrag = false, bool? hideOnEmpty = false, bool? hideOnError = false, bool? hideOnLoading = false, bool showOnFocus = true, bool hideOnUnfocus = true, bool hideWithKeyboard = true, bool hideOnSelect = true, required SuggestionsItemBuilder<T> itemBuilder, IndexedWidgetBuilder? itemSeparatorBuilder, bool? retainOnLoading = true, required WidgetBuilder loadingBuilder, required WidgetBuilder emptyBuilder, required ValueSetter<T>? onSelected, ScrollController? scrollController, SuggestionsController<T>? suggestionsController, required SuggestionsCallback<T> suggestionsCallback, AnimationTransitionBuilder? transitionBuilder, DecorationBuilder? decorationBuilder, ListBuilder? listBuilder, BoxConstraints? constraints, Offset? offset})
const

Properties

animationDuration Duration?
Duration of the animation for showing and hiding the suggestions box.
final
autoFlipDirection bool
Whether the suggestions box should automatically flip direction if there's not enough space in the desired direction, but there is enough space in the opposite direction.
final
autoFlipMinHeight double
The minimum height the suggesttions box can have before attempting to flip.
final
builder → TextFieldBuilder
Builds the text field that will be used to search for the suggestions.
final
constraints BoxConstraints?
The constraints to be applied to the suggestions box.
final
controller TextEditingController?
Controller for the text field used for input.
final
debounceDuration Duration?
Duration to wait for changes in the text field before updating suggestions.
final
decorationBuilder → DecorationBuilder?
Builder function for decorating the suggestions box.
final
direction VerticalDirection?
The direction in which the suggestions box opens.
final
emptyBuilder WidgetBuilder
Builds the widget for when the suggestions list is empty.
final
errorBuilder → SuggestionsErrorBuilder
/ Builds the widget for when the controller has an error.
final
focusNode FocusNode?
The focus node of the child, usually an EditableText widget.
final
hashCode int
The hash code for this object.
no setterinherited
hideKeyboardOnDrag bool?
Whether the keyboard should be hidden when the user scrolls the suggestions list.
final
hideOnEmpty bool?
Whether the suggestions box should be hidden when no suggestions are available.
final
hideOnError bool?
Whether the suggestions box should be hidden on error.
final
hideOnLoading bool?
Whether the suggestions box should be hidden during loading.
final
hideOnSelect bool
Whether to keep the suggestions visible even after a suggestion has been selected.
final
hideOnUnfocus bool
Whether the suggestions box should be hidden when the child of the suggestions box loses focus.
final
hideWithKeyboard bool
Whether the suggestions box should be hidden when the keyboard is closed.
final
itemBuilder → SuggestionsItemBuilder<T>
Called for each suggestion to build the corresponding widget.
final
itemSeparatorBuilder IndexedWidgetBuilder?
Optional builder function to add separators between suggestions.
final
key Key?
Controls how one widget replaces another widget in the tree.
finalinherited
listBuilder → ListBuilder?
Optional builder function to customize the suggestions list.
final
loadingBuilder WidgetBuilder
Builder function to display a loading indicator.
final
offset Offset?
The offset of the suggestions box. The value is automatically flipped if the suggestions box is flipped.
final
onSelected ValueSetter<T>?
Called when a suggestion is selected.
final
retainOnLoading bool?
Whether to retain the previous suggestions while loading new suggestions.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
scrollController ScrollController?
Controller for the ScrollView containing the suggestions.
final
showOnFocus bool
Whether the suggestions box should be shown when the child of the suggestions box gains focus.
final
suggestionsCallback → SuggestionsCallback<T>
Called with the search pattern to get matching suggestions.
final
suggestionsController SuggestionsController<T>?
Controller to manage the state of the suggestions box.
final
transitionBuilder → AnimationTransitionBuilder?
Builder function for animating the suggestions box.
final

Methods

createElement() StatefulElement
Creates a StatefulElement to manage this widget's location in the tree.
inherited
createState() State<RawTypeAheadField<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.
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}) 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