CustomizedSearchBar class

CustomizedSearchBar is a custom search bar widget. This widget provides voice search functionality along with dynamic result filtering.

Inheritance

Constructors

CustomizedSearchBar.new({Key? key, required String hintText, required String speakHintText, IconData? prefixIcon, IconData? suffixIcon, IconData? voiceIcon, required Color prefixIconColor, required Color suffixIconColor, required Color voiceIconColor, required Color focusedBorderColor, required Color cursorColor, required double prefixIconSize, required double suffixIconSize, required double voiceIconSize, required double borderRadiusValue, required double borderWidth, required List<String> searchList, required ValueChanged<List<String>> onSearchResultChanged, required TextEditingController searchController})
Constructor for CustomizedSearchBar.

Properties

borderRadiusValue double
The border radius of the search bar.
final
borderWidth double
The border width of the search bar.
final
cursorColor Color
The color of the cursor.
final
focusedBorderColor Color
The color of the border when the search bar is focused.
final
hashCode int
The hash code for this object.
no setterinherited
hintText String
The hint text displayed in the search bar.
final
key Key?
Controls how one widget replaces another widget in the tree.
finalinherited
onSearchResultChanged ValueChanged<List<String>>
Callback function triggered when the search results change.
final
prefixIcon IconData?
The icon displayed at the start of the search bar. Optional.
final
prefixIconColor Color
The color of the prefix icon.
final
prefixIconSize double
The size of the prefix icon.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
searchController TextEditingController
The text controller used for managing the text input in the search bar.
final
searchList List<String>
The list of items to be searched.
final
speakHintText String
The hint text displayed while voice input is active.
final
suffixIcon IconData?
The icon displayed at the end of the search bar. Optional.
final
suffixIconColor Color
The color of the suffix icon.
final
suffixIconSize double
The size of the suffix icon.
final
voiceIcon IconData?
The icon used for voice search. Optional.
final
voiceIconColor Color
The color of the voice search icon.
final
voiceIconSize double
The size of the voice search icon.
final

Methods

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