MaterialSearchBarData class final

Material-specific configuration for a search bar widget.

Extends PlatformSearchBarData with Material-only properties.

Inheritance

Constructors

MaterialSearchBarData({Key? widgetKey, TextEditingController? controller, String? hintText, Widget? leading, VoidCallback? onTap, ValueChanged<String>? onChanged, ValueChanged<String>? onSubmitted, TextInputType? keyboardType, bool autoFocus = kDefaultAutoFocus, FocusNode? focusNode, bool enabled = kDefaultEnabled, Iterable<Widget>? trailing, TapRegionCallback? onTapOutside, BoxConstraints? constraints, WidgetStateProperty<double?>? elevation, WidgetStateProperty<Color?>? backgroundColor, WidgetStateProperty<Color?>? shadowColor, WidgetStateProperty<Color?>? surfaceTintColor, WidgetStateProperty<Color?>? overlayColor, WidgetStateProperty<BorderSide?>? side, WidgetStateProperty<OutlinedBorder?>? shape, WidgetStateProperty<EdgeInsetsGeometry?>? padding, WidgetStateProperty<TextStyle?>? textStyle, WidgetStateProperty<TextStyle?>? hintStyle, TextCapitalization? textCapitalization, TextInputAction? textInputAction, EdgeInsets scrollPadding = kDefaultScrollPadding, EditableTextContextMenuBuilder? contextMenuBuilder, bool readOnly = kDefaultReadOnly})
Creates Material-specific search bar configuration.
const

Properties

autoFocus bool
Whether the search bar should autofocus.
finalinherited
backgroundColor WidgetStateProperty<Color?>?
Background color as a WidgetStateProperty.
final
constraints BoxConstraints?
Size constraints for the search bar.
final
contextMenuBuilder EditableTextContextMenuBuilder?
Context menu builder for the search input.
final
controller TextEditingController?
Text editing controller for the search input.
finalinherited
elevation WidgetStateProperty<double?>?
Elevation as a WidgetStateProperty.
final
enabled bool
Whether the search bar is enabled.
finalinherited
focusNode FocusNode?
Focus node for the search bar.
finalinherited
hashCode int
The hash code for this object.
no setterinherited
hintStyle WidgetStateProperty<TextStyle?>?
Hint text style as a WidgetStateProperty.
final
hintText String?
Hint text displayed when the search bar is empty.
finalinherited
keyboardType TextInputType?
Keyboard type for the search input.
finalinherited
leading Widget?
Leading widget (e.g., a search icon).
finalinherited
onChanged ValueChanged<String>?
Callback when the search text changes.
finalinherited
onSubmitted ValueChanged<String>?
Callback when the search text is submitted.
finalinherited
onTap VoidCallback?
Callback when the search bar is tapped.
finalinherited
onTapOutside TapRegionCallback?
Callback when tapping outside the search bar.
final
overlayColor WidgetStateProperty<Color?>?
Overlay color as a WidgetStateProperty.
final
padding WidgetStateProperty<EdgeInsetsGeometry?>?
Padding as a WidgetStateProperty.
final
readOnly bool
Whether the search bar is read-only.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
scrollPadding EdgeInsets
Scroll padding for the search input.
final
shadowColor WidgetStateProperty<Color?>?
Shadow color as a WidgetStateProperty.
final
shape WidgetStateProperty<OutlinedBorder?>?
Shape as a WidgetStateProperty.
final
side WidgetStateProperty<BorderSide?>?
Border side as a WidgetStateProperty.
final
surfaceTintColor WidgetStateProperty<Color?>?
Surface tint color as a WidgetStateProperty.
final
textCapitalization TextCapitalization?
Text capitalization for the search input.
final
textInputAction TextInputAction?
Text input action for the search input.
final
textStyle WidgetStateProperty<TextStyle?>?
Text style as a WidgetStateProperty.
final
trailing Iterable<Widget>?
Trailing widgets (e.g., action icons).
final
widgetKey Key?
Key applied to the underlying platform widget.
finalinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited

Constants

kDefaultReadOnly → const bool
Default value for readOnly.
kDefaultScrollPadding → const EdgeInsets
Default value for scrollPadding.