StacInputDecorationTheme class

A Stac representation of input decoration theme properties.

This class defines the default styling for input decorations including text styles, colors, borders, and layout properties for form fields.

{@tool snippet} Dart Example:

const StacInputDecorationTheme(
  labelStyle: StacTextStyle(color: StacColors.grey),
  focusedBorder: StacInputBorder(
    borderSide: StacBorderSide(color: StacColors.blue),
  ),
  filled: true,
  fillColor: '#F5F5F5',
)

{@end-tool}

{@tool snippet} JSON Example:

{
  "labelStyle": {"color": "#757575"},
  "focusedBorder": {
    "borderSide": {"color": "#2196F3"}
  },
  "filled": true,
  "fillColor": "#F5F5F5"
}

{@end-tool}

Inheritance
Available extensions
Annotations
  • @JsonSerializable.new()

Constructors

StacInputDecorationTheme({StacTextStyle? labelStyle, StacTextStyle? floatingLabelStyle, StacTextStyle? helperStyle, int? helperMaxLines, StacTextStyle? hintStyle, StacTextStyle? errorStyle, int? errorMaxLines, String? floatingLabelBehavior, String? floatingLabelAlignment, bool? isDense, StacEdgeInsets? contentPadding, bool? isCollapsed, String? iconColor, StacTextStyle? prefixStyle, String? prefixIconColor, StacTextStyle? suffixStyle, String? suffixIconColor, StacTextStyle? counterStyle, bool? filled, String? fillColor, StacBorderSide? activeIndicatorBorder, StacBorderSide? outlineBorder, String? focusColor, String? hoverColor, StacInputBorder? errorBorder, StacInputBorder? focusedBorder, StacInputBorder? focusedErrorBorder, StacInputBorder? disabledBorder, StacInputBorder? enabledBorder, StacInputBorder? border, bool? alignLabelWithHint, StacBoxConstraints? constraints})
Creates an input decoration theme with the specified properties.
const
StacInputDecorationTheme.fromJson(Map<String, dynamic> json)
Creates a StacInputDecorationTheme from a JSON map.
factory

Properties

activeIndicatorBorder StacBorderSide?
The border for active indicators.
final
alignLabelWithHint bool?
Whether to align the label with the hint.
final
border StacInputBorder?
The default border.
final
constraints StacBoxConstraints?
The constraints for the input decoration.
final
contentPadding StacEdgeInsets?
The padding for the input content.
final
counterStyle StacTextStyle?
The style for counter text.
final
disabledBorder StacInputBorder?
The border when the input is disabled.
final
enabledBorder StacInputBorder?
The border when the input is enabled.
final
errorBorder StacInputBorder?
The border when there is an error.
final
errorMaxLines int?
The maximum number of lines for error text.
final
errorStyle StacTextStyle?
The style for error text.
final
fillColor String?
The fill color for the input field.
final
filled bool?
Whether the input field should be filled.
final
floatingLabelAlignment String?
How floating labels should be aligned.
final
floatingLabelBehavior String?
How floating labels should behave.
final
floatingLabelStyle StacTextStyle?
The style for floating labels when they are floating.
final
focusColor String?
The color when the input is focused.
final
focusedBorder StacInputBorder?
The border when the input is focused.
final
focusedErrorBorder StacInputBorder?
The border when focused and there is an error.
final
hashCode int
The hash code for this object.
no setterinherited
helperMaxLines int?
The maximum number of lines for helper text.
final
helperStyle StacTextStyle?
The style for helper text.
final
hintStyle StacTextStyle?
The style for hint text.
final
hoverColor String?
The color when the input is hovered.
final
iconColor String?
The color of the icon.
final
isCollapsed bool?
Whether the input decoration is collapsed.
final
isDense bool?
Whether the input decoration is dense.
final
labelStyle StacTextStyle?
The style for input field labels.
final
outlineBorder StacBorderSide?
The outline border.
final
prefixIconColor String?
The color of the prefix icon.
final
prefixStyle StacTextStyle?
The style for prefix text.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
suffixIconColor String?
The color of the suffix icon.
final
suffixStyle StacTextStyle?
The style for suffix text.
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
parse(BuildContext context) InputDecorationTheme

Available on StacInputDecorationTheme?, provided by the StacInputDecorationThemeParser extension

toJson() Map<String, dynamic>
Converts this element to a JSON map
override
toString() String
A string representation of this object.
inherited

Operators

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