BaseSearchBar constructor

const BaseSearchBar({
  1. Key? key,
  2. String? placeholder,
  3. String? text,
  4. String? prompt,
  5. bool showsCancelButton = false,
  6. bool showsBookmarkButton = false,
  7. bool showsSearchResultsButton = false,
  8. CNSearchBarStyle searchBarStyle = CNSearchBarStyle.defaultStyle,
  9. Color? barTintColor,
  10. Color? tintColor,
  11. Color? searchFieldBackgroundColor,
  12. bool showsScopeBar = false,
  13. List<String> scopeButtonTitles = const [],
  14. int selectedScopeIndex = 0,
  15. CNKeyboardType keyboardType = CNKeyboardType.defaultType,
  16. CNKeyboardAppearance keyboardAppearance = CNKeyboardAppearance.defaultAppearance,
  17. CNReturnKeyType returnKeyType = CNReturnKeyType.search,
  18. bool enablesReturnKeyAutomatically = true,
  19. CNAutocapitalizationType autocapitalizationType = CNAutocapitalizationType.none,
  20. CNAutocorrectionType autocorrectionType = CNAutocorrectionType.defaultType,
  21. CNSpellCheckingType spellCheckingType = CNSpellCheckingType.defaultType,
  22. ValueChanged<String>? onTextChanged,
  23. ValueChanged<String>? onSearchButtonClicked,
  24. VoidCallback? onCancelButtonClicked,
  25. ValueChanged<int>? onScopeChanged,
  26. VoidCallback? onBookmarkButtonClicked,
  27. double height = 56.0,
  28. BaseParam? baseParam,
})

Creates a native iOS search bar.

Implementation

const BaseSearchBar({
  Key? key,
  this.placeholder,
  this.text,
  this.prompt,
  this.showsCancelButton = false,
  this.showsBookmarkButton = false,
  this.showsSearchResultsButton = false,
  this.searchBarStyle = CNSearchBarStyle.defaultStyle,
  this.barTintColor,
  this.tintColor,
  this.searchFieldBackgroundColor,
  this.showsScopeBar = false,
  this.scopeButtonTitles = const [],
  this.selectedScopeIndex = 0,
  this.keyboardType = CNKeyboardType.defaultType,
  this.keyboardAppearance = CNKeyboardAppearance.defaultAppearance,
  this.returnKeyType = CNReturnKeyType.search,
  this.enablesReturnKeyAutomatically = true,
  this.autocapitalizationType = CNAutocapitalizationType.none,
  this.autocorrectionType = CNAutocorrectionType.defaultType,
  this.spellCheckingType = CNSpellCheckingType.defaultType,
  this.onTextChanged,
  this.onSearchButtonClicked,
  this.onCancelButtonClicked,
  this.onScopeChanged,
  this.onBookmarkButtonClicked,
  this.height = 56.0,
  BaseParam? baseParam,
}) : super(key: key, baseParam: baseParam);