SearchAnchor.bar constructor

SearchAnchor.bar({
  1. Widget? barLeading,
  2. Iterable<Widget>? barTrailing,
  3. String? barHintText,
  4. GestureTapCallback? onTap,
  5. ValueChanged<String>? onSubmitted,
  6. ValueChanged<String>? onChanged,
  7. VoidCallback? onClose,
  8. VoidCallback? onOpen,
  9. MaterialStateProperty<double?>? barElevation,
  10. MaterialStateProperty<Color?>? barBackgroundColor,
  11. MaterialStateProperty<Color?>? barOverlayColor,
  12. MaterialStateProperty<BorderSide?>? barSide,
  13. MaterialStateProperty<OutlinedBorder?>? barShape,
  14. MaterialStateProperty<EdgeInsetsGeometry?>? barPadding,
  15. EdgeInsetsGeometry? viewBarPadding,
  16. MaterialStateProperty<TextStyle?>? barTextStyle,
  17. MaterialStateProperty<TextStyle?>? barHintStyle,
  18. ViewBuilder? viewBuilder,
  19. Widget? viewLeading,
  20. Iterable<Widget>? viewTrailing,
  21. String? viewHintText,
  22. Color? viewBackgroundColor,
  23. double? viewElevation,
  24. BorderSide? viewSide,
  25. OutlinedBorder? viewShape,
  26. double? viewHeaderHeight,
  27. TextStyle? viewHeaderTextStyle,
  28. TextStyle? viewHeaderHintStyle,
  29. Color? dividerColor,
  30. BoxConstraints? constraints,
  31. BoxConstraints? viewConstraints,
  32. EdgeInsetsGeometry? viewPadding,
  33. bool? shrinkWrap,
  34. bool? isFullScreen,
  35. SearchController searchController,
  36. TextCapitalization textCapitalization,
  37. required SuggestionsBuilder suggestionsBuilder,
  38. TextInputAction? textInputAction,
  39. TextInputType? keyboardType,
  40. EdgeInsets scrollPadding,
  41. EditableTextContextMenuBuilder contextMenuBuilder,
  42. bool enabled,
})

Create a SearchAnchor that has a SearchBar which opens a search view.

All the barX parameters are used to customize the anchor. Similarly, all the viewX parameters are used to override the view's defaults.

This example shows how to use a SearchAnchor.bar which uses a default search bar to open a search view route.
link

To create a local project with this code sample, run:
flutter create --sample=material.SearchAnchor.SearchAnchor.bar.1 mysample

Implementation

factory SearchAnchor.bar({
  Widget? barLeading,
  Iterable<Widget>? barTrailing,
  String? barHintText,
  GestureTapCallback? onTap,
  ValueChanged<String>? onSubmitted,
  ValueChanged<String>? onChanged,
  VoidCallback? onClose,
  VoidCallback? onOpen,
  MaterialStateProperty<double?>? barElevation,
  MaterialStateProperty<Color?>? barBackgroundColor,
  MaterialStateProperty<Color?>? barOverlayColor,
  MaterialStateProperty<BorderSide?>? barSide,
  MaterialStateProperty<OutlinedBorder?>? barShape,
  MaterialStateProperty<EdgeInsetsGeometry?>? barPadding,
  EdgeInsetsGeometry? viewBarPadding,
  MaterialStateProperty<TextStyle?>? barTextStyle,
  MaterialStateProperty<TextStyle?>? barHintStyle,
  ViewBuilder? viewBuilder,
  Widget? viewLeading,
  Iterable<Widget>? viewTrailing,
  String? viewHintText,
  Color? viewBackgroundColor,
  double? viewElevation,
  BorderSide? viewSide,
  OutlinedBorder? viewShape,
  double? viewHeaderHeight,
  TextStyle? viewHeaderTextStyle,
  TextStyle? viewHeaderHintStyle,
  Color? dividerColor,
  BoxConstraints? constraints,
  BoxConstraints? viewConstraints,
  EdgeInsetsGeometry? viewPadding,
  bool? shrinkWrap,
  bool? isFullScreen,
  SearchController searchController,
  TextCapitalization textCapitalization,
  required SuggestionsBuilder suggestionsBuilder,
  TextInputAction? textInputAction,
  TextInputType? keyboardType,
  EdgeInsets scrollPadding,
  EditableTextContextMenuBuilder contextMenuBuilder,
  bool enabled,
}) = _SearchAnchorWithSearchBar;