SearchField class

Inheritance

Constructors

SearchField({Key? key, bool canCloseOutsideBounds = true, bool closeDropDownOnClearFilterSearch = false, EdgeInsets? closedHeaderPadding, SingleSelectController<AutoCompleteResponseModel?>? controller, CustomDropdownDecoration? decoration, CustomDropdownDisabledDecoration? disabledDecoration, bool enabled = true, bool excludeSelected = true, EdgeInsets? expandedHeaderPadding, Duration? futureRequestDelay, Widget headerBuilder(BuildContext, AutoCompleteResponseModel, bool)?, bool hideSelectedFieldWhenExpanded = false, String? hintText, EdgeInsets? itemsListPadding, ScrollController? itemsScrollController, EdgeInsets? listItemPadding, int maxlines = 1, Widget noResultFoundBuilder(BuildContext, String)?, String? noResultFoundText, void onChanged(AutoCompleteResponseModel? value)?, OverlayPortalController? overlayController, double? overlayHeight, String? searchHintText, Widget? searchRequestLoadingIndicator, dynamic visibility(bool)?, required String apiKey, ApiType apiType = const AutoComplete()})
const

Properties

apiKey String
Define your api key
final
apiType ApiType
Two types of api available
final
canCloseOutsideBounds bool
Can close CustomDropdown overlay by tapping outside. Here "outside" covers the entire screen.
final
closedHeaderPadding EdgeInsets?
Padding for CustomDropdown header (closed state).
final
closeDropDownOnClearFilterSearch bool
CustomDropdown will close on tap Clear filter for all search and searchRequest constructors
final
controller SingleSelectController<AutoCompleteResponseModel?>?
The controller that can be used to control CustomDropdown selected item.
final
decoration CustomDropdownDecoration?
CustomDropdown decoration. Contain sub-decorations SearchFieldDecoration, ListItemDecoration and ScrollbarThemeData.
final
disabledDecoration CustomDropdownDisabledDecoration?
CustomDropdown disabled decoration.
final
enabled bool
CustomDropdown enabled/disabled state. If disabled, you can not open the dropdown.
final
excludeSelected bool
Hide the selected item from the items list.
final
expandedHeaderPadding EdgeInsets?
Padding for CustomDropdown header (opened/expanded state).
final
futureRequestDelay Duration?
Duration after which the futureRequest is to be executed.
final
hashCode int
The hash code for this object.
no setterinherited
headerBuilder Widget Function(BuildContext, AutoCompleteResponseModel, bool)?
The headerBuilder that will be used to build CustomDropdown header field.
final
hideSelectedFieldWhenExpanded bool
Hide the header field when CustomDropdown overlay opened/expanded.
final
hintText String?
Text that suggests what sort of data the dropdown represents.
final
itemsListPadding EdgeInsets?
Padding for CustomDropdown items list.
final
itemsScrollController ScrollController?
Scroll controller to access items list scroll behavior.
final
key Key?
Controls how one widget replaces another widget in the tree.
finalinherited
listItemPadding EdgeInsets?
Padding for CustomDropdown each list item.
final
maxlines int
Text maxlines for header and list item text.
final
noResultFoundBuilder Widget Function(BuildContext, String)?
The noResultFoundBuilder that will be used to build area when there's no search results match.
final
noResultFoundText String?
Text that notify there's no search results match.
final
onChanged → void Function(AutoCompleteResponseModel? value)?
Called when the item of the CustomDropdown should change.
final
overlayController OverlayPortalController?
The overlayController allows you to explicitly handle the CustomDropdown overlay states (show/hide).
final
overlayHeight double?
CustomDropdown opened/expanded area height. Only applicable if items are greater than 4 otherwise adjust automatically.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
searchHintText String?
Text that suggests what to search in the search field.
final
searchRequestLoadingIndicator Widget?
Widget to display while search request loading.
final
visibility → dynamic Function(bool)?
Callback for dropdown visibility.
final

Methods

build(BuildContext context) Widget
Describes the part of the user interface represented by this widget.
override
createElement() StatelessElement
Creates a StatelessElement to manage this widget's 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, 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