SearchInputDecoration class
Constructors
-
SearchInputDecoration({Key? key, Color cursorColor = Colors.black, TextCapitalization textCapitalization = TextCapitalization.none, TextStyle? searchStyle, Color? cursorErrorColor, double? cursorHeight, double? cursorWidth = 2.0, bool? cursorOpacityAnimates, Radius? cursorRadius, Brightness? keyboardAppearance, InputBorder? border, BoxConstraints? prefixIconConstraints, int? hintMaxLines, TextStyle? floatingLabelStyle, String? errorText, Widget? error, TextDirection? hintTextDirection, Duration? hintFadeDuration, Widget? helper, Widget? prefixIcon, Widget? suffixIcon, Widget? suffix, Widget? label, @Deprecated('Use maintainHintSize instead. ' 'This will maintain both hint height and hint width. ' 'This feature was deprecated after v1.26.0') bool maintainHintHeight = true, bool maintainHintSize = true, Color? suffixIconColor, Widget? prefix, Color? prefixIconColor, InputBorder? enabledBorder, InputBorder? focusedBorder, InputBorder? errorBorder, InputBorder? focusedErrorBorder, InputBorder? disabledBorder, EdgeInsetsGeometry? contentPadding, String? hintText, Widget? hint, TextStyle? hintStyle, String? labelText, TextStyle? labelStyle, String? prefixText, TextStyle? prefixStyle, String? suffixText, TextStyle? suffixStyle, String? counterText, TextStyle? counterStyle, bool? filled, Color? fillColor, Color? focusColor, Color? hoverColor, Widget? icon, Color? iconColor, bool? isCollapsed, bool? isDense, FloatingLabelBehavior? floatingLabelBehavior, FloatingLabelAlignment? floatingLabelAlignment, bool? alignLabelWithHint, BoxConstraints? constraints, Widget? counter, String? semanticCounterText, String? helperText, TextStyle? helperStyle, int? helperMaxLines, int? errorMaxLines, TextStyle? errorStyle, BoxConstraints? suffixIconConstraints, VisualDensity? visualDensity})
-
Properties
-
alignLabelWithHint
→ bool?
-
Typically set to true when the InputDecorator contains a multiline
TextField (TextField.maxLines is null or > 1) to override the default
behavior of aligning the label with the center of the TextField.
finalinherited
-
border
→ InputBorder?
-
The shape of the border to draw around the decoration's container.
finalinherited
-
constraints
→ BoxConstraints?
-
Defines minimum and maximum sizes for the InputDecorator.
finalinherited
-
contentPadding
→ EdgeInsetsGeometry?
-
The padding for the input decoration's container.
finalinherited
-
counter
→ Widget?
-
Optional custom counter widget to go in the place otherwise occupied by
counterText. If this property is non null, then counterText is
ignored.
finalinherited
-
counterStyle
→ TextStyle?
-
The style to use for the counterText.
finalinherited
-
counterText
→ String?
-
Optional text to place below the line as a character count.
finalinherited
-
cursorColor
→ Color
-
The color of the cursor.
The cursor indicates the current location of text insertion point in the field.
If this is null it will default to the ambient DefaultSelectionStyle.cursorColor. If that is
null, and the ThemeData.platform is TargetPlatform.iOS or TargetPlatform.macOS it will use
CupertinoThemeData.primaryColor. Otherwise it will use the value of ColorScheme.primary of
ThemeData.colorScheme.
final
-
cursorErrorColor
→ Color?
-
Creates a FormField that contains a TextField.
The color of the cursor when the InputDecorator is showing an error.
final
-
cursorHeight
→ double?
-
How tall the cursor will be.
final
-
cursorOpacityAnimates
→ bool?
-
Whether the cursor will animate from fully transparent to fully opaque during each cursor
blink.
By default, the cursor opacity will animate on iOS platforms and will not animate on Android /
platforms.
final
-
cursorRadius
→ Radius?
-
The radius of the cursor.How rounded the corners of the cursor should be.
By default, the cursor has no radius.
final
-
cursorWidth
→ double?
-
How thick the cursor will be.
Defaults to 2.0.
The cursor will draw under the text. The cursor width will extend to the right of the
boundary between characters for left-to-right text and to the left for right-to-left text.
This corresponds to extending downstream relative to the selected position. Negative values
may be used to reverse this behavior.
final
-
disabledBorder
→ InputBorder?
-
The border to display when the InputDecorator is disabled and is not
showing an error.
finalinherited
-
enabled
→ bool
-
If false the opacity of the visual elements is reduced, including helperText,errorText, and counterText.
finalinherited
-
enabledBorder
→ InputBorder?
-
The border to display when the InputDecorator is enabled and is not
showing an error.
finalinherited
-
error
→ Widget?
-
Optional widget that appears below the InputDecorator.child and the border.
finalinherited
-
errorBorder
→ InputBorder?
-
The border to display when the InputDecorator does not have the focus and
is showing an error.
finalinherited
-
errorMaxLines
→ int?
-
The maximum number of lines the errorText can occupy.
finalinherited
-
errorStyle
→ TextStyle?
-
The style to use for the InputDecoration.errorText.
finalinherited
-
errorText
→ String?
-
Text that appears below the InputDecorator.child and the border.
finalinherited
-
fillColor
→ Color?
-
The base fill color of the decoration's container color.
finalinherited
-
filled
→ bool?
-
If true the decoration's container is filled with fillColor.
finalinherited
-
floatingLabelAlignment
→ FloatingLabelAlignment?
-
Defines where the floating label should be displayed.
finalinherited
-
floatingLabelBehavior
→ FloatingLabelBehavior?
-
Defines how the floating label should behave.
finalinherited
-
floatingLabelStyle
→ TextStyle?
-
The style to use for InputDecoration.labelText when the label is
above (i.e., vertically adjacent to) the input field.
finalinherited
-
focusColor
→ Color?
-
The fill color of the decoration's container when it has the input focus.
finalinherited
-
focusedBorder
→ InputBorder?
-
The border to display when the InputDecorator has the focus and is not
showing an error.
finalinherited
-
focusedErrorBorder
→ InputBorder?
-
The border to display when the InputDecorator has the focus and is
showing an error.
finalinherited
-
hashCode
→ int
-
The hash code for this object.
no setterinherited
-
helper
→ Widget?
-
Optional widget that appears below the InputDecorator.child.
finalinherited
-
helperMaxLines
→ int?
-
The maximum number of lines the helperText can occupy.
finalinherited
-
helperStyle
→ TextStyle?
-
The style to use for the helperText.
finalinherited
-
helperText
→ String?
-
Text that provides context about the InputDecorator.child's value, such
as how the value will be used.
finalinherited
-
hint
→ Widget?
-
The widget to use in place of the hintText.
finalinherited
-
hintFadeDuration
→ Duration?
-
The duration of the hintText fade in and fade out animations.
finalinherited
-
hintMaxLines
→ int?
-
The maximum number of lines the hintText can occupy.
finalinherited
-
hintStyle
→ TextStyle?
-
The style to use for the hintText.
finalinherited
-
hintText
→ String?
-
Text that suggests what sort of input the field accepts.
finalinherited
-
hintTextDirection
→ TextDirection?
-
The direction to use for the hintText.
finalinherited
-
hoverColor
→ Color?
-
The color of the highlight for the decoration shown if the container
is being hovered over by a mouse.
finalinherited
-
icon
→ Widget?
-
An icon to show before the input field and outside of the decoration's
container.
finalinherited
-
iconColor
→ Color?
-
The color of the icon.
finalinherited
-
isCollapsed
→ bool?
-
Whether the decoration is the same size as the input field.
finalinherited
-
isDense
→ bool?
-
Whether the InputDecorator.child is part of a dense form (i.e., uses less vertical
space).
finalinherited
-
key
→ Key?
-
final
-
keyboardAppearance
→ Brightness?
-
The appearance of the keyboard.
This setting is only honored on iOS devices.
final
-
label
→ Widget?
-
Optional widget that describes the input field.
finalinherited
-
labelStyle
→ TextStyle?
-
The style to use for InputDecoration.labelText when the label is on top
of the input field.
finalinherited
-
labelText
→ String?
-
Optional text that describes the input field.
finalinherited
-
maintainHintHeight
→ bool
-
Whether the input field's height should always be greater than or equal to
the height of the hintText, even if the hintText is not visible.
finalinherited
-
maintainHintSize
→ bool
-
Whether the input field's size should always be greater than or equal to
the size of the hintText, even if the hintText is not visible.
finalinherited
-
prefix
→ Widget?
-
Optional widget to place on the line before the input.
finalinherited
-
prefixIcon
→ Widget?
-
An icon that appears before the prefix or prefixText and before
the editable part of the text field, within the decoration's container.
finalinherited
-
prefixIconColor
→ Color?
-
Optional color of the prefixIcon
finalinherited
-
prefixIconConstraints
→ BoxConstraints?
-
The constraints for the prefix icon.
finalinherited
-
prefixStyle
→ TextStyle?
-
The style to use for the prefixText.
finalinherited
-
prefixText
→ String?
-
Optional text prefix to place on the line before the input.
finalinherited
-
runtimeType
→ Type
-
A representation of the runtime type of the object.
no setterinherited
-
searchStyle
→ TextStyle?
-
Specifies TextStyle for search input.
final
-
semanticCounterText
→ String?
-
A semantic label for the counterText.
finalinherited
-
suffix
→ Widget?
-
Optional widget to place on the line after the input.
finalinherited
-
suffixIcon
→ Widget?
-
An icon that appears after the editable part of the text field and
after the suffix or suffixText, within the decoration's container.
finalinherited
-
suffixIconColor
→ Color?
-
Optional color of the suffixIcon.
finalinherited
-
suffixIconConstraints
→ BoxConstraints?
-
The constraints for the suffix icon.
finalinherited
-
suffixStyle
→ TextStyle?
-
The style to use for the suffixText.
finalinherited
-
suffixText
→ String?
-
Optional text suffix to place on the line after the input.
finalinherited
-
textCapitalization
→ TextCapitalization
-
text capitalization defaults to TextCapitalization.none
final
-
visualDensity
→ VisualDensity?
-
Defines how compact the decoration's layout will be.
finalinherited
Methods
-
applyDefaults(Object inputDecorationTheme)
→ InputDecoration
-
Used by widgets like TextField and InputDecorator to create a new
InputDecoration with default values taken from the
inputDecorationTheme.
inherited
-
copyWith({Key? key, Color? cursorColor, Color? cursorErrorColor, double? cursorHeight, double? cursorWidth, bool? cursorOpacityAnimates, Radius? cursorRadius, Brightness? keyboardAppearance, TextCapitalization? textCapitalization, TextStyle? searchStyle, bool? alignLabelWithHint, InputBorder? border, BoxConstraints? constraints, EdgeInsetsGeometry? contentPadding, Widget? counter, TextStyle? counterStyle, String? counterText, InputBorder? disabledBorder, bool? enabled, InputBorder? enabledBorder, Widget? error, InputBorder? errorBorder, int? errorMaxLines, TextStyle? errorStyle, String? errorText, Color? fillColor, bool? filled, FloatingLabelAlignment? floatingLabelAlignment, FloatingLabelBehavior? floatingLabelBehavior, TextStyle? floatingLabelStyle, Color? focusColor, InputBorder? focusedBorder, InputBorder? focusedErrorBorder, Widget? helper, Widget? hint, int? helperMaxLines, TextStyle? helperStyle, String? helperText, Duration? hintFadeDuration, int? hintMaxLines, TextStyle? hintStyle, String? hintText, TextDirection? hintTextDirection, Color? hoverColor, Widget? icon, Color? iconColor, bool? isCollapsed, bool? isDense, Widget? label, TextStyle? labelStyle, String? labelText, bool? maintainHintHeight, Widget? prefix, Widget? prefixIcon, Color? prefixIconColor, BoxConstraints? prefixIconConstraints, TextStyle? prefixStyle, String? prefixText, String? semanticCounterText, Widget? suffix, Widget? suffixIcon, Color? suffixIconColor, BoxConstraints? suffixIconConstraints, TextStyle? suffixStyle, String? suffixText, bool? maintainHintSize, VisualDensity? visualDensity, SemanticsService? semanticsService})
→ SearchInputDecoration
-
Creates a copy of this input decoration with the given fields replaced
by the new values.
override
-
noSuchMethod(Invocation invocation)
→ dynamic
-
Invoked when a nonexistent method or property is accessed.
inherited
-
toString()
→ String
-
A string representation of this object.
inherited