SuperSearchBar constructor

SuperSearchBar({
  1. Color? resultColor,
  2. Color backgroundColor = CupertinoColors.tertiarySystemFill,
  3. String cancelButtonText = "Cancel",
  4. String placeholderText = "Search",
  5. bool enabled = true,
  6. SearchBarScrollBehavior scrollBehavior = SearchBarScrollBehavior.floated,
  7. SearchBarAnimationBehavior animationBehavior = SearchBarAnimationBehavior.top,
  8. SearchBarResultBehavior resultBehavior = SearchBarResultBehavior.visibleOnFocus,
  9. Duration animationDuration = const Duration(milliseconds: 250),
  10. TextStyle placeholderTextStyle = const TextStyle(color: CupertinoColors.systemGrey),
  11. TextStyle cancelTextStyle = const TextStyle(color: CupertinoColors.systemBlue),
  12. Icon prefixIcon = const Icon(CupertinoIcons.search),
  13. List<SuperAction> actions = const <SuperAction>[],
  14. double height = 40,
  15. EdgeInsets padding = const EdgeInsets.symmetric(horizontal: 15.0),
  16. Widget searchResult = const Text(".", style: TextStyle(color: Colors.transparent)),
  17. TextStyle textStyle = const TextStyle(),
  18. ValueChanged<String>? onChanged,
  19. ValueChanged<String>? onSubmitted,
  20. ValueChanged<bool>? onFocused,
  21. TextEditingController? searchController,
  22. 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,
});