InputDecorationTheme class

Defines the default appearance of InputDecorators.

Descendant widgets obtain the current theme's InputDecorationThemeData using InputDecorationTheme.of. When a widget uses InputDecorationTheme.of, it is automatically rebuilt if the theme later changes.

See also:

Inheritance
Mixed-in types

Constructors

InputDecorationTheme({Key? key, TextStyle? labelStyle, TextStyle? floatingLabelStyle, TextStyle? helperStyle, int? helperMaxLines, TextStyle? hintStyle, Duration? hintFadeDuration, int? hintMaxLines, TextStyle? errorStyle, int? errorMaxLines, FloatingLabelBehavior? floatingLabelBehavior, FloatingLabelAlignment? floatingLabelAlignment, bool? isDense, EdgeInsetsGeometry? contentPadding, bool? isCollapsed, Color? iconColor, TextStyle? prefixStyle, Color? prefixIconColor, BoxConstraints? prefixIconConstraints, TextStyle? suffixStyle, Color? suffixIconColor, BoxConstraints? suffixIconConstraints, TextStyle? counterStyle, bool? filled, Color? fillColor, BorderSide? activeIndicatorBorder, BorderSide? outlineBorder, Color? focusColor, Color? hoverColor, InputBorder? errorBorder, InputBorder? focusedBorder, InputBorder? focusedErrorBorder, InputBorder? disabledBorder, InputBorder? enabledBorder, InputBorder? border, bool? alignLabelWithHint, BoxConstraints? constraints, VisualDensity? visualDensity, InputDecorationThemeData? data, Widget? child})
Creates a InputDecorationTheme that controls visual parameters for descendant InputDecorators.
const

Properties

activeIndicatorBorder → BorderSide?
The borderSide of the UnderlineInputBorder with color and weight.
no setter
alignLabelWithHint → bool
Overrides the default value for InputDecoration.alignLabelWithHint.
no setter
border → InputBorder?
Overrides the default value for InputDecoration.border.
no setter
child → Widget
The widget below this widget in the tree.
finalinherited
constraints → BoxConstraints?
Overrides the default value for InputDecoration.constraints.
no setter
contentPadding → EdgeInsetsGeometry?
Overrides the default value for InputDecoration.contentPadding.
no setter
counterStyle → TextStyle?
Overrides the default value for InputDecoration.counterStyle.
no setter
data → InputDecorationThemeData
The properties used for all descendant TabBar widgets.
no setter
disabledBorder → InputBorder?
Overrides the default value for InputDecoration.disabledBorder.
no setter
enabledBorder → InputBorder?
Overrides the default value for InputDecoration.enabledBorder.
no setter
errorBorder → InputBorder?
Overrides the default value for InputDecoration.errorBorder.
no setter
errorMaxLines → int?
Overrides the default value for InputDecoration.errorMaxLines.
no setter
errorStyle → TextStyle?
Overrides the default value for InputDecoration.errorStyle.
no setter
fillColor → Color?
Overrides the default value for InputDecoration.fillColor.
no setter
filled → bool
Overrides the default value for InputDecoration.filled.
no setter
floatingLabelAlignment → FloatingLabelAlignment
Overrides the default value for InputDecoration.floatingLabelAlignment.
no setter
floatingLabelBehavior → FloatingLabelBehavior
Overrides the default value for InputDecoration.floatingLabelBehavior.
no setter
floatingLabelStyle → TextStyle?
Overrides the default value for InputDecoration.floatingLabelStyle.
no setter
focusColor → Color?
Overrides the default value for InputDecoration.focusColor.
no setter
focusedBorder → InputBorder?
Overrides the default value for InputDecoration.focusedBorder.
no setter
focusedErrorBorder → InputBorder?
Overrides the default value for InputDecoration.focusedErrorBorder.
no setter
hashCode → int
The hash code for this object.
no setterinherited
helperMaxLines → int?
Overrides the default value for InputDecoration.helperMaxLines.
no setter
helperStyle → TextStyle?
Overrides the default value for InputDecoration.floatingLabelStyle.
no setter
hintFadeDuration → Duration?
Overrides the default value for InputDecoration.hintFadeDuration.
no setter
hintMaxLines → int?
Overrides the default value for InputDecoration.hintMaxLines.
no setter
hintStyle → TextStyle?
Overrides the default value for InputDecoration.hintStyle.
no setter
hoverColor → Color?
Overrides the default value for InputDecoration.hoverColor.
no setter
iconColor → Color?
Overrides the default value for InputDecoration.iconColor.
no setter
isCollapsed → bool
Overrides the default value for InputDecoration.isCollapsed.
no setter
isDense → bool
Overrides the default value for InputDecoration.isDense.
no setter
key → Key?
Controls how one widget replaces another widget in the tree.
finalinherited
labelStyle → TextStyle?
Overrides the default value for InputDecoration.labelStyle.
no setter
outlineBorder → BorderSide?
The borderSide of the OutlineInputBorder with color and weight.
no setter
prefixIconColor → Color?
Overrides the default value for InputDecoration.prefixIconColor.
no setter
prefixIconConstraints → BoxConstraints?
Overrides the default value for InputDecoration.prefixIconConstraints.
no setter
prefixStyle → TextStyle?
Overrides the default value for InputDecoration.prefixStyle.
no setter
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
suffixIconColor → Color?
Overrides the default value for InputDecoration.suffixIconColor.
no setter
suffixIconConstraints → BoxConstraints?
Overrides the default value for InputDecoration.suffixIconConstraints.
no setter
suffixStyle → TextStyle?
Overrides the default value for InputDecoration.suffixStyle.
no setter
visualDensity → VisualDensity?
Overrides the default value for InputDecoration.visualDensity.
no setter

Methods

copyWith({TextStyle? labelStyle, TextStyle? floatingLabelStyle, TextStyle? helperStyle, int? helperMaxLines, TextStyle? hintStyle, Duration? hintFadeDuration, int? hintMaxLines, TextStyle? errorStyle, int? errorMaxLines, FloatingLabelBehavior? floatingLabelBehavior, FloatingLabelAlignment? floatingLabelAlignment, bool? isDense, EdgeInsetsGeometry? contentPadding, bool? isCollapsed, Color? iconColor, TextStyle? prefixStyle, Color? prefixIconColor, BoxConstraints? prefixIconConstraints, TextStyle? suffixStyle, Color? suffixIconColor, BoxConstraints? suffixIconConstraints, TextStyle? counterStyle, bool? filled, Color? fillColor, BorderSide? activeIndicatorBorder, BorderSide? outlineBorder, Color? focusColor, Color? hoverColor, InputBorder? errorBorder, InputBorder? focusedBorder, InputBorder? focusedErrorBorder, InputBorder? disabledBorder, InputBorder? enabledBorder, InputBorder? border, bool? alignLabelWithHint, BoxConstraints? constraints, VisualDensity? visualDensity}) → InputDecorationTheme
Creates a copy of this object but with the given fields replaced with the new values.
createElement() → InheritedElement
Inflates this configuration to a concrete instance.
inherited
debugDescribeChildren() → List<DiagnosticsNode>
Returns a list of DiagnosticsNode objects describing this node's children.
inherited
debugFillProperties(DiagnosticPropertiesBuilder properties) → void
Add additional properties associated with the node.
inherited
merge(InputDecorationTheme? other) → InputDecorationTheme
Returns a copy of this InputDecorationTheme where the non-null fields in the given InputDecorationTheme override the corresponding nullable fields in this InputDecorationTheme.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toDiagnosticsNode({String? name, DiagnosticsTreeStyle? style}) → DiagnosticsNode
Returns a debug representation of the object that is used by debugging tools and by DiagnosticsNode.toStringDeep.
inherited
toString({DiagnosticLevel minLevel = DiagnosticLevel.info}) → String
A string representation of this object.
inherited
toStringDeep({String prefixLineOne = '', String? prefixOtherLines, DiagnosticLevel minLevel = DiagnosticLevel.debug, int wrapWidth = 65}) → String
Returns a string representation of this node and its descendants.
inherited
toStringShallow({String joiner = ', ', DiagnosticLevel minLevel = DiagnosticLevel.debug}) → String
Returns a one-line detailed description of the object.
inherited
toStringShort() → String
A brief description of this object, usually just the runtimeType and the hashCode.
inherited
updateShouldNotify(covariant InputDecorationTheme oldWidget) → bool
Whether the framework should notify widgets that inherit from this widget.
override
wrap(BuildContext context, Widget child) → Widget
Return a copy of this inherited theme with the specified child.
override

Operators

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

Static Methods

of(BuildContext context) → InputDecorationThemeData
Returns the closest InputDecorationThemeData instance given the build context.