CupertinoTypeAheadField<T> class
A widget that shows suggestions above a text field while the user is typing.
This is the Cupertino version of the widget. builder, itemBuilder, loadingBuilder, emptyBuilder, errorBuilder and decorationBuilder will default to Cupertino.
- Inheritance
-
- Object
- DiagnosticableTree
- Widget
- StatefulWidget
- RawTypeAheadField<
T> - CupertinoTypeAheadField
Constructors
-
CupertinoTypeAheadField({Key? key, Duration? animationDuration = const Duration(milliseconds: 200), bool autoFlipDirection = false, double autoFlipMinHeight = 144, TextFieldBuilder? builder, TextEditingController? controller, Duration? debounceDuration = const Duration(milliseconds: 300), VerticalDirection? direction = VerticalDirection.down, 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, WidgetBuilder? loadingBuilder, 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})
Properties
- animationDuration → Duration?
-
Duration of the animation for showing and hiding the suggestions box.
finalinherited
- 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.
finalinherited
- autoFlipMinHeight → double
-
The minimum height the suggesttions box can have before attempting to flip.
finalinherited
- builder → TextFieldBuilder
-
Builds the text field that will be used to search for the suggestions.
finalinherited
- constraints → BoxConstraints?
-
The constraints to be applied to the suggestions box.
finalinherited
- controller → TextEditingController?
-
Controller for the text field used for input.
finalinherited
- debounceDuration → Duration?
-
Duration to wait for changes in the text field before updating suggestions.
finalinherited
- decorationBuilder → DecorationBuilder?
-
Builder function for decorating the suggestions box.
finalinherited
- direction → VerticalDirection?
-
The direction in which the suggestions box opens.
finalinherited
- emptyBuilder → WidgetBuilder
-
Builds the widget for when the suggestions list is empty.
finalinherited
- errorBuilder → SuggestionsErrorBuilder
-
/ Builds the widget for when the controller has an error.
finalinherited
- focusNode → FocusNode?
-
The focus node of the child, usually an EditableText widget.
finalinherited
- 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.
finalinherited
- hideOnEmpty → bool?
-
Whether the suggestions box should be hidden when no suggestions are available.
finalinherited
- hideOnError → bool?
-
Whether the suggestions box should be hidden on error.
finalinherited
- hideOnLoading → bool?
-
Whether the suggestions box should be hidden during loading.
finalinherited
- hideOnSelect → bool
-
Whether to keep the suggestions visible even after a suggestion has been selected.
finalinherited
- hideOnUnfocus → bool
-
Whether the suggestions box should be hidden when the child of the suggestions box loses focus.
finalinherited
- hideWithKeyboard → bool
-
Whether the suggestions box should be hidden when the keyboard is closed.
finalinherited
-
itemBuilder
→ SuggestionsItemBuilder<
T> -
Called for each suggestion to build the corresponding widget.
finalinherited
- itemSeparatorBuilder → IndexedWidgetBuilder?
-
Optional builder function to add separators between suggestions.
finalinherited
- key → Key?
-
Controls how one widget replaces another widget in the tree.
finalinherited
- listBuilder → ListBuilder?
-
Optional builder function to customize the suggestions list.
finalinherited
- loadingBuilder → WidgetBuilder
-
Builder function to display a loading indicator.
finalinherited
- offset → Offset?
-
The offset of the suggestions box.
The value is automatically flipped if the suggestions box is flipped.
finalinherited
-
onSelected
→ ValueSetter<
T> ? -
Called when a suggestion is selected.
finalinherited
- retainOnLoading → bool?
-
Whether to retain the previous suggestions while loading new suggestions.
finalinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- scrollController → ScrollController?
-
Controller for the ScrollView containing the suggestions.
finalinherited
- showOnFocus → bool
-
Whether the suggestions box should be shown when the child of the suggestions box gains focus.
finalinherited
-
suggestionsCallback
→ SuggestionsCallback<
T> -
Called with the search pattern to get matching suggestions.
finalinherited
-
suggestionsController
→ SuggestionsController<
T> ? -
Controller to manage the state of the suggestions box.
finalinherited
- transitionBuilder → AnimationTransitionBuilder?
-
Builder function for animating the suggestions box.
finalinherited
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.
inherited
-
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