AnimSearchBar constructor
const
AnimSearchBar({
- Key? key,
- required double width,
- required TextEditingController textController,
- Icon? suffixIcon,
- Icon? prefixIcon,
- String helpText = "Search...",
- Color? color = Colors.white,
- Color? textFieldColor = Colors.white,
- Color? searchIconColor = Colors.black,
- Color? textFieldIconColor = Colors.black,
- required dynamic onSuffixTap,
- int animationDurationInMilli = 375,
- required dynamic onSubmitted(),
- bool rtl = false,
- bool autoFocus = false,
- TextStyle? style,
- bool closeSearchOnSuffixTap = false,
- bool boxShadow = true,
- List<
TextInputFormatter> ? inputFormatters,
Implementation
const AnimSearchBar({
Key? key,
/// The width cannot be null
required this.width,
/// The textController cannot be null
required this.textController,
this.suffixIcon,
this.prefixIcon,
this.helpText = "Search...",
/// choose your custom color
this.color = Colors.white,
/// choose your custom color for the search when it is expanded
this.textFieldColor = Colors.white,
/// choose your custom color for the search when it is expanded
this.searchIconColor = Colors.black,
/// choose your custom color for the search when it is expanded
this.textFieldIconColor = Colors.black,
/// The onSuffixTap cannot be null
required this.onSuffixTap,
this.animationDurationInMilli = 375,
/// The onSubmitted cannot be null
required this.onSubmitted,
/// make the search bar to open from right to left
this.rtl = false,
/// make the keyboard to show automatically when the searchbar is expanded
this.autoFocus = false,
/// TextStyle of the contents inside the searchbar
this.style,
/// close the search on suffix tap
this.closeSearchOnSuffixTap = false,
/// enable/disable the box shadow decoration
this.boxShadow = true,
/// can add list of inputformatters to control the input
this.inputFormatters,
}) : super(key: key);