SearchBarAnimation class

Inheritance

Constructors

SearchBarAnimation({required TextEditingController textEditingController, required bool isOriginalAnimation, required Widget trailingWidget, required Widget secondaryButtonWidget, required Widget buttonWidget, double? searchBoxWidth, String hintText = "Search Here", Color? searchBoxColour = AppColours.white, Color? buttonColour = AppColours.white, Color? cursorColour = AppColours.black, Color? hintTextColour = AppColours.grey, Color? searchBoxBorderColour = AppColours.black12, Color? buttonShadowColour = AppColours.black45, Color? buttonBorderColour = AppColours.black26, int durationInMilliSeconds = Dimensions.t1000, TextInputType textInputType = TextInputType.text, bool isSearchBoxOnRightSide = false, bool enableKeyboardFocus = false, bool enableBoxBorder = false, bool enableButtonBorder = false, bool enableButtonShadow = true, bool enableBoxShadow = true, bool textAlignToRight = false, Function? onSaved, Function? onChanged, Function? onFieldSubmitted, Function? onExpansionComplete, Function? onCollapseComplete, dynamic onPressButton(bool isOpen)?, Function? onEditingComplete, TextStyle? enteredTextStyle, double buttonElevation = Dimensions.d0, List<TextInputFormatter>? inputFormatters, Key? key})
const

Properties

buttonBorderColour Color?
User can set the border colour of button from here
final
buttonColour Color?
This property allows to set the background colour of the search button.
final
buttonElevation double
This give the shadow to the search box button by default it is 0.
final
buttonShadowColour Color?
User can set the shadow colour of button form here.
final
buttonWidget Widget
Provide the button icon that is when the search box is closed by default it is search icon.
final
cursorColour Color?
This allows to set the colour of the cursor of textFormField.
final
durationInMilliSeconds int
Set the duration of animation from here by default it is 1000 milliseconds.
final
enableBoxBorder bool
If user wants the border around the search box can enable from this parameter.
final
enableBoxShadow bool
Can set if searchBox shadow is required from here.
final
enableButtonBorder bool
If user wants border around the button they can set it from this parameter.
final
enableButtonShadow bool
Can enable or disable the shadow of the button from here if isOriginalAnimation is set to false.
final
enableKeyboardFocus bool
This property allows user to enable the keyboard on tap of search box button directly if this is set as true if not set as true than it will not automatically bring keyboard on tap of the search box button instead it will bring keyboard once searchField is tapped.
final
enteredTextStyle TextStyle?
This allows us to change the style of the text which user have entered in the textFormField of search box.
final
hashCode int
The hash code for this object.
no setterinherited
hintText String
Can Change the hint text from here.
final
hintTextColour Color?
This allows to set the hintText color of textFormField of the search box.
final
inputFormatters List<TextInputFormatter>?
Can set RegExp in the textFormField of search box from here.
final
isOriginalAnimation bool
This is the required field it allows to enable or disable the animation of the button currently it's animation is based on the 'DecoratedBoxTransition', If it is disabled than user can give the shadow to the button but if it is set to true than cannot give shadow to the button when search box is closed.
final
isSearchBoxOnRightSide bool
If user required the search box appear on the right side instead of left side they can set it from here.
final
key Key?
Controls how one widget replaces another widget in the tree.
finalinherited
onChanged Function?
OnChanged function for the textFormField.
final
onCollapseComplete Function?
onCollapseComplete functions can be used to perform something just after searchbox is closed.
final
onEditingComplete Function?
onFieldSubmitted function for the textFormField.
final
onExpansionComplete Function?
onExpansionComplete functions can be used to perform something just after searchbox is opened.
final
onFieldSubmitted Function?
onFieldSubmitted function for the textFormField.
final
onPressButton → (dynamic Function(bool isOpen)?)
onPressButton function can be used to handle open/close searchbar button taps. it may be used for animation start handling
final
onSaved Function?
OnSaved function for the textFormField, In order to use this user must wrap this widget into 'Form' widget.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
searchBoxBorderColour Color?
If user required the search box border than they can set it's colour from here.
final
searchBoxColour Color?
This allows to set the background colour of the whole search box field by default it is set to white.
final
searchBoxWidth double?
This gives the width to the searchbar by default it will take the size of whole screen.
final
secondaryButtonWidget Widget
Provide the button icon that is when the search box is open by default it is close icon.
final
textAlignToRight bool
Can set the direction of the text, That is form right to left in case of languages like arabic.
final
textEditingController TextEditingController
Need to pass the textEditingController for the textFormField of the searchbar.
final
textInputType TextInputType
Can set keyBoard Type from here (e.g TextInputType.numeric) by default it is set to text,
final
trailingWidget Widget
Provide trailing icon in search box which is at the end of search box by default it is search icon.
final

Methods

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