SearchAnchor.bar constructor
- Widget? barLeading,
- Iterable<
Widget> ? barTrailing, - String? barHintText,
- GestureTapCallback? onTap,
- ValueChanged<
String> ? onSubmitted, - ValueChanged<
String> ? onChanged, - MaterialStateProperty<
double?> ? barElevation, - MaterialStateProperty<
Color?> ? barBackgroundColor, - MaterialStateProperty<
Color?> ? barOverlayColor, - MaterialStateProperty<
BorderSide?> ? barSide, - MaterialStateProperty<
OutlinedBorder?> ? barShape, - MaterialStateProperty<
EdgeInsetsGeometry?> ? barPadding, - MaterialStateProperty<
TextStyle?> ? barTextStyle, - MaterialStateProperty<
TextStyle?> ? barHintStyle, - 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,
- bool? isFullScreen,
- SearchController searchController,
- TextCapitalization textCapitalization,
- required SuggestionsBuilder suggestionsBuilder,
- TextInputAction? textInputAction,
- TextInputType? keyboardType,
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.bar.1 mysample
Implementation
factory SearchAnchor.bar({
Widget? barLeading,
Iterable<Widget>? barTrailing,
String? barHintText,
GestureTapCallback? onTap,
ValueChanged<String>? onSubmitted,
ValueChanged<String>? onChanged,
MaterialStateProperty<double?>? barElevation,
MaterialStateProperty<Color?>? barBackgroundColor,
MaterialStateProperty<Color?>? barOverlayColor,
MaterialStateProperty<BorderSide?>? barSide,
MaterialStateProperty<OutlinedBorder?>? barShape,
MaterialStateProperty<EdgeInsetsGeometry?>? barPadding,
MaterialStateProperty<TextStyle?>? barTextStyle,
MaterialStateProperty<TextStyle?>? barHintStyle,
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,
bool? isFullScreen,
SearchController searchController,
TextCapitalization textCapitalization,
required SuggestionsBuilder suggestionsBuilder,
TextInputAction? textInputAction,
TextInputType? keyboardType,
}) = _SearchAnchorWithSearchBar;