AnimatedSearchBar class
A customizable animated search bar widget for Flutter applications.
- Inheritance
-
- Object
- DiagnosticableTree
- Widget
- StatefulWidget
- AnimatedSearchBar
Constructors
- AnimatedSearchBar({Key? key, String label = '', Alignment labelAlignment = Alignment.centerLeft, TextAlign labelTextAlign = TextAlign.start, dynamic onChanged(String)?, TextStyle labelStyle = const TextStyle(fontSize: 14, fontWeight: FontWeight.bold), InputDecoration searchDecoration = const InputDecoration(labelText: 'Search', alignLabelWithHint: true, contentPadding: EdgeInsets.symmetric(vertical: 8, horizontal: 8), border: OutlineInputBorder(borderRadius: BorderRadius.all(Radius.circular(8)))), Duration animationDuration = const Duration(milliseconds: 350), TextStyle searchStyle = const TextStyle(color: Colors.black), Color? cursorColor, Duration duration = const Duration(milliseconds: 300), double height = 60, Widget closeIcon = const Icon(Icons.close, key: ValueKey('close')), Widget searchIcon = const Icon(Icons.search, key: ValueKey('search')), TextEditingController? controller, dynamic onFieldSubmitted(String)?, TextInputAction textInputAction = TextInputAction.search, VoidCallback? onClose})
-
Creates an
AnimatedSearchBar
widget.const
Properties
- animationDuration → Duration
-
final
- closeIcon → Widget
-
final
- controller → TextEditingController?
-
final
- cursorColor → Color?
-
final
- duration → Duration
-
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- height → double
-
final
- key → Key?
-
Controls how one widget replaces another widget in the tree.
finalinherited
- label → String
-
final
- labelAlignment → Alignment
-
final
- labelStyle → TextStyle
-
final
- labelTextAlign → TextAlign
-
final
- onChanged → (dynamic Function(String)?)
-
final
- onClose → VoidCallback?
-
final
- onFieldSubmitted → (dynamic Function(String)?)
-
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- searchDecoration → InputDecoration
-
final
- searchIcon → Widget
-
final
- searchStyle → TextStyle
-
final
- textInputAction → TextInputAction
-
final
Methods
-
createElement(
) → StatefulElement -
Creates a StatefulElement to manage this widget's location in the tree.
inherited
-
createState(
) → _AnimatedSearchBarState -
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