SuperSearchBar constructor
SuperSearchBar({
- Color? resultColor,
- Color backgroundColor = CupertinoColors.tertiarySystemFill,
- String cancelButtonText = "Cancel",
- String placeholderText = "Search",
- bool enabled = true,
- SearchBarScrollBehavior scrollBehavior = SearchBarScrollBehavior.floated,
- SearchBarAnimationBehavior animationBehavior = SearchBarAnimationBehavior.top,
- SearchBarResultBehavior resultBehavior = SearchBarResultBehavior.visibleOnFocus,
- Duration animationDuration = const Duration(milliseconds: 250),
- TextStyle placeholderTextStyle = const TextStyle(color: CupertinoColors.systemGrey),
- TextStyle cancelTextStyle = const TextStyle(color: CupertinoColors.systemBlue),
- Icon prefixIcon = const Icon(CupertinoIcons.search),
- List<
SuperAction> actions = const <SuperAction>[], - double height = 40,
- EdgeInsets padding = const EdgeInsets.symmetric(horizontal: 15.0),
- Widget searchResult = const Text(".", style: TextStyle(color: Colors.transparent)),
- TextStyle textStyle = const TextStyle(),
- ValueChanged<
String> ? onChanged, - ValueChanged<
String> ? onSubmitted, - ValueChanged<
bool> ? onFocused, - TextEditingController? searchController,
- FocusNode? searchFocusNode,
Implementation
SuperSearchBar({
this.resultColor,
this.backgroundColor = CupertinoColors.tertiarySystemFill,
this.cancelButtonText = "Cancel",
this.placeholderText = "Search",
this.enabled = true,
this.scrollBehavior = SearchBarScrollBehavior.floated,
this.animationBehavior = SearchBarAnimationBehavior.top,
this.resultBehavior = SearchBarResultBehavior.visibleOnFocus,
this.animationDuration = const Duration(milliseconds: 250),
this.placeholderTextStyle =
const TextStyle(color: CupertinoColors.systemGrey),
this.cancelTextStyle = const TextStyle(color: CupertinoColors.systemBlue),
this.prefixIcon = const Icon(
CupertinoIcons.search,
),
this.actions = const <SuperAction>[],
this.height = 40,
this.padding = const EdgeInsets.symmetric(horizontal: 15.0),
this.searchResult = const Text(
".",
style: TextStyle(
color: Colors.transparent,
),
),
this.textStyle = const TextStyle(),
this.onChanged,
this.onSubmitted,
this.onFocused,
this.searchController,
this.searchFocusNode,
});