EasySearchBar constructor

const EasySearchBar({
  1. Key? key,
  2. required Widget title,
  3. required dynamic onSearch(
    1. String
    ),
  4. Widget suggestionBuilder(
    1. String data
    )?,
  5. Widget? leading,
  6. List<Widget> actions = const [],
  7. TextStyle? searchHintStyle,
  8. TextStyle searchTextStyle = const TextStyle(),
  9. SystemUiOverlayStyle? systemOverlayStyle,
  10. List<String>? suggestions,
  11. dynamic onSuggestionTap(
    1. String data
    )?,
  12. IconThemeData? searchBackIconTheme,
  13. Future<List<String>> asyncSuggestions(
    1. String value
    )?,
  14. Color? searchCursorColor,
  15. String searchHintText = '',
  16. Color? searchBackgroundColor,
  17. Widget suggestionLoaderBuilder()?,
  18. double suggestionsElevation = 5,
  19. Color? backgroundColor,
  20. Color? foregroundColor,
  21. double? elevation,
  22. double appBarHeight = 56,
  23. bool isFloating = false,
  24. bool openOverlayOnSearch = false,
  25. TextStyle? titleTextStyle,
  26. IconThemeData? iconTheme,
  27. TextStyle suggestionTextStyle = const TextStyle(),
  28. Color? suggestionBackgroundColor,
  29. Duration animationDuration = const Duration(milliseconds: 450),
  30. Duration debounceDuration = const Duration(milliseconds: 400),
  31. TextInputType searchTextKeyboardType = TextInputType.text,
})

Implementation

const EasySearchBar({
  Key? key,
  required this.title,
  required this.onSearch,
  this.suggestionBuilder,
  this.leading,
  this.actions = const [],
  this.searchHintStyle,
  this.searchTextStyle = const TextStyle(),
  this.systemOverlayStyle,
  this.suggestions,
  this.onSuggestionTap,
  this.searchBackIconTheme,
  this.asyncSuggestions,
  this.searchCursorColor,
  this.searchHintText = '',
  this.searchBackgroundColor,
  this.suggestionLoaderBuilder,
  this.suggestionsElevation = 5,
  this.backgroundColor,
  this.foregroundColor,
  this.elevation,
  this.appBarHeight = 56,
  this.isFloating = false,
  this.openOverlayOnSearch = false,
  this.titleTextStyle,
  this.iconTheme,
  this.suggestionTextStyle = const TextStyle(),
  this.suggestionBackgroundColor,
  this.animationDuration = const Duration(milliseconds: 450),
  this.debounceDuration = const Duration(milliseconds: 400),
  this.searchTextKeyboardType = TextInputType.text
}) : assert(elevation == null || elevation >= 0.0),
      super(key: key);