AnimatedSearch constructor
const
AnimatedSearch({
- Key? key,
- double width = 0.7,
- TextEditingController? textEditingController,
- IconData? startIcon = Icons.search,
- IconData? closeIcon = Icons.close,
- Color? iconColor = Colors.white,
- Color? cursorColor = Colors.white,
- dynamic onChanged()?,
- InputDecoration? decoration,
Creates an AnimatedSearch
widget.
The width
parameter is the width of the search box when expanded.
The textEditingController
parameter is the controller for the TextField
.
The startIcon
parameter is the icon displayed when the search box is folded.
The closeIcon
parameter is the icon displayed when the search box is expanded.
The iconColor
parameter is the color of the search icons.
The cursorColor
parameter is the color of the cursor in the TextField
.
The onChanged
parameter is a callback that is called when the text in the TextField
changes.
The decoration
parameter is the decoration for the TextField
.
Implementation
const AnimatedSearch({
Key? key,
this.width = 0.7,
this.textEditingController,
this.startIcon = Icons.search,
this.closeIcon = Icons.close,
this.iconColor = Colors.white,
this.cursorColor = Colors.white,
this.onChanged,
this.decoration,
}) : super(key: key);