SimpleSearchBar class

Inheritance

Constructors

SimpleSearchBar({Key? key, Widget? leading, bool? topLeading, EdgeInsetsGeometry? padding, Widget? title, Decoration? textFieldDecoration, InputDecoration? inputDecoration, Widget? clearAction = const Icon(Icons.clear), required void onChangeSearch(String?), double searchBarElevation = 0.0, BorderRadiusGeometry? searchBorderRadiusGeometry, TextStyle? textFieldTextStyle, Duration? debounceDuration = const Duration(milliseconds: 500), Decoration? searchBarDecoration, SearchTermValidator<String>? searchTermValidator})
const
SimpleSearchBar.google({Key? key, Widget? leading, bool? topLeading, EdgeInsetsGeometry? padding, Widget? title, Decoration? textFieldDecoration, InputDecoration? inputDecoration, Widget? clearAction = const Icon(Icons.clear), required void onChangeSearch(String?), double searchBarElevation = 8.0, BorderRadiusGeometry? searchBorderRadiusGeometry = const BorderRadius.all(Radius.circular(48)), TextStyle? textFieldTextStyle, Duration? debounceDuration = const Duration(milliseconds: 500), Decoration? searchBarDecoration = const BoxDecoration(color: Colors.white, borderRadius: const BorderRadius.all(Radius.circular(48))), SearchTermValidator<String>? searchTermValidator})
Imitation of google search bar
const
SimpleSearchBar.topLeading({Key? key, Widget? leading, bool? topLeading = true, EdgeInsetsGeometry? padding, Widget? title, Decoration? textFieldDecoration, InputDecoration? inputDecoration, Widget? clearAction = const Icon(Icons.clear), required void onChangeSearch(String?), double searchBarElevation = 0.0, BorderRadiusGeometry? searchBorderRadiusGeometry, TextStyle? textFieldTextStyle, Duration? debounceDuration = const Duration(milliseconds: 500), Decoration? searchBarDecoration, SearchTermValidator<String>? searchTermValidator})
Put the leading on top of the bar
const

Properties

clearAction Widget?
A widget with action that clear search field. Typically the cleatAction widget is an Icon or an IconButton.
final
debounceDuration Duration?
Debouce duration help adjust perfomance.
final
hashCode int
The hash code for this object.
no setterinherited
inputDecoration InputDecoration?
InputDecoration of search field.
final
key Key?
Controls how one widget replaces another widget in the tree.
finalinherited
leading Widget?
A widget to display before the search field. Typically the leading widget is an Icon or an IconButton.
final
onChangeSearch → void Function(String?)
Handle change of search terms.
final
padding EdgeInsetsGeometry?
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
searchBarDecoration Decoration?
The decoration of search bar.
final
searchBarElevation double
Elevation of search bar.
final
searchBorderRadiusGeometry BorderRadiusGeometry?
Border of search bar.
final
searchTermValidator SearchTermValidator<String>?
Determines the condition for the search to be done
final
textFieldDecoration Decoration?
Decoration of text in search field.
final
textFieldTextStyle TextStyle?
Define style for text in search field.
final
title Widget?
Title of bar
final
topLeading bool?
Put the leading on the top of bar
final

Methods

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