EasySearchBar class
- Inheritance
-
- Object
- DiagnosticableTree
- Widget
- StatefulWidget
- EasySearchBar
- Implemented types
Constructors
-
EasySearchBar({Key? key, required Widget title, required dynamic onSearch(String), Widget suggestionBuilder(String data)?, Widget? leading, List<
Widget> actions = const [], TextStyle? searchHintStyle, TextStyle searchTextStyle = const TextStyle(), SystemUiOverlayStyle? systemOverlayStyle, List<String> ? suggestions, dynamic onSuggestionTap(String data)?, IconThemeData? searchBackIconTheme, Future<List< asyncSuggestions(String value)?, Color? searchCursorColor, String searchHintText = '', Color? searchBackgroundColor, Widget suggestionLoaderBuilder()?, double suggestionsElevation = 5, Color? backgroundColor, Color? foregroundColor, double? elevation, double appBarHeight = 56, bool isFloating = false, bool openOverlayOnSearch = false, TextStyle? titleTextStyle, IconThemeData? iconTheme, TextStyle suggestionTextStyle = const TextStyle(), Color? suggestionBackgroundColor, Duration animationDuration = const Duration(milliseconds: 450), Duration debounceDuration = const Duration(milliseconds: 400), TextInputType searchTextKeyboardType = TextInputType.text})String> > -
const
Properties
-
actions
→ List<
Widget> -
Extra custom actions that can be displayed inside AppBar
final
- animationDuration → Duration
-
Can be used to set a duration for the AppBar search show and hide animation
final
- appBarHeight → double
-
Can be used to change AppBar height
final
-
asyncSuggestions
→ (Future<
List< Function(String value)?)String> > -
Can be used to set async suggestions list
final
- backgroundColor → Color?
-
Can be used to change AppBar background color
final
- debounceDuration → Duration
-
Can be used to set the debounce time for async data fetch
final
- elevation → double?
-
Can be used to change AppBar elevation
final
- foregroundColor → Color?
-
Can be used to change AppBar foreground color
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- iconTheme → IconThemeData?
-
Can be used to set custom icon theme for AppBar icons
final
- isFloating → bool
-
Can be used to determine if it will be a normal or floating AppBar
final
- key → Key?
-
Controls how one widget replaces another widget in the tree.
finalinherited
- leading → Widget?
-
Can be used to add leading icon to AppBar
final
- onSearch → dynamic Function(String)
-
Returns the current search value
When search is closed, this method returns an empty value to clear the current search
final
- onSuggestionTap → (dynamic Function(String data)?)
-
Instead of using the default suggestion tap action that fills the textField, you can set your own custom action for it
final
- openOverlayOnSearch → bool
-
Can be used to determine if the suggestions overlay will be opened when clicking search
final
- preferredSize → Size
-
The size this widget would prefer if it were otherwise unconstrained.
no setteroverride
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- searchBackgroundColor → Color?
-
Can be used to set the search input background color
final
- searchBackIconTheme → IconThemeData?
-
Can be used to set custom icon theme for the search textField back button
final
- searchCursorColor → Color?
-
Can be used to set search textField cursor color
final
- searchHintStyle → TextStyle?
-
Can be used to set search textField hint style
final
- searchHintText → String
-
Can be used to set search textField hint text
final
- searchTextKeyboardType → TextInputType
-
Can be used to set search textField keyboard type
final
- searchTextStyle → TextStyle
-
Can be used to set search textField text style
final
- suggestionBackgroundColor → Color?
-
Can be used to change suggestions list background color
final
- suggestionBuilder → (Widget Function(String data)?)
-
Can be used to create custom suggestion item widget
final
- suggestionLoaderBuilder → (Widget Function()?)
-
A function that can be used to create a widget to display a custom suggestions loader
final
-
suggestions
→ List<
String> ? -
Can be used to create a suggestions list
final
- suggestionsElevation → double
-
Can be used to change suggestion list elevation
final
- suggestionTextStyle → TextStyle
-
Can be used to change the suggestions text style
final
- systemOverlayStyle → SystemUiOverlayStyle?
-
Can be used to set SystemUiOverlayStyle to the AppBar
final
- title → Widget
-
The title to be displayed inside AppBar
final
- titleTextStyle → TextStyle?
-
Can be used to set the AppBar title style
final
Methods
-
createElement(
) → StatefulElement -
Creates a StatefulElement to manage this widget's location in the tree.
inherited
-
createState(
) → State< EasySearchBar> -
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