AdvancedSearch class

Class for adding AutoSearchInput to your project

Inheritance

Constructors

AdvancedSearch({required List<String> searchItems, required OnTap onItemTap, int maxElementsToDisplay = 7, SearchClear onSearchClear = _searchClearDefaultFunction, Color? selectedTextColor, Color? unSelectedTextColor, Color? enabledBorderColor, Color? disabledBorderColor, Color? focusedBorderColor, Color? cursorColor, double borderRadius = 10.0, double fontSize = 14.0, double singleItemHeight = 45.0, int itemsShownAtStart = 10, String hintText = 'Enter a name', bool autoCorrect = false, bool enabled = true, SubmitResults? onSubmitted, SubmitResults? onEditingProgress, Color? inputTextFieldBgColor, Color searchResultsBgColor = Colors.white, SearchMode searchMode = SearchMode.CONTAINS, bool caseSensitive = false, int minLettersForSearch = 0, Color borderColor = const Color(0xFFFAFAFA), Color hintTextColor = Colors.grey, bool clearSearchEnabled = true, bool showListOfResults = true, bool hideHintOnTextInputFocus = false, double verticalPadding = 10, double horizontalPadding = 10, WidgetItems? searchItemsWidget, bool autoListing = false})
const

Properties

autoCorrect bool
Boolean to set autoCorrect
final
autoListing bool
final
borderColor Color
final
borderRadius double
Border Radius of the TextField and the resultant elements
final
caseSensitive bool
final
clearSearchEnabled bool
final
cursorColor Color?
Color of the cursor
final
disabledBorderColor Color?
Color of the border when the TextField is disabled
final
enabled bool
Boolean to set whether the TextField is enabled
final
enabledBorderColor Color?
Color of the border when the TextField is enabled
final
focusedBorderColor Color?
Color of the border when the TextField is being integrated with
final
fontSize double
Font Size for both the text in the TextField and the results
final
hashCode int
The hash code for this object.
no setterinherited
hideHintOnTextInputFocus bool
final
hintText String
Hint text to show inside the TextField
final
hintTextColor Color
final
horizontalPadding double
final
inputTextFieldBgColor Color?
Text Inout Background Color
final
itemsShownAtStart int
Number of items to be shown when the TextField is tapped
final
key Key?
Controls how one widget replaces another widget in the tree.
finalinherited
maxElementsToDisplay int
The max number of elements to be displayed when the TextField is clicked
final
minLettersForSearch int
final
onEditingProgress SubmitResults?
Function to be called on editing the text field
final
onItemTap OnTap
Function to call when a certain item is clicked Takes in a parameter of the item which was clicked
final
onSearchClear SearchClear
Callback to be called when the user clears his search
final
onSubmitted SubmitResults?
onSubmitted function
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
searchItems List<String>
List of data that can be searched through for the results
final
searchItemsWidget WidgetItems?
final
searchMode SearchMode
final
searchResultsBgColor Color
List Background Color
final
selectedTextColor Color?
The color of text which actually appears in the results for which the text is typed
final
showListOfResults bool
final
singleItemHeight double
Height of a single item in the resultant list
final
unSelectedTextColor Color?
The color of text which actually appears in the results for the remaining text
final
verticalPadding double
final

Methods

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