StacButtonThemeData class

A Stac model representing Flutter's ButtonThemeData.

Defines the theme for Material buttons, including colors, dimensions, shapes, and layout properties.

{@tool snippet} Dart Example:

StacButtonThemeData(
  minWidth: 88.0,
  height: 36.0,
  buttonColor: '#2196F3',
  textTheme: StacButtonTextTheme.primary,
)

{@end-tool}

{@tool snippet} JSON Example:

{
  "minWidth": 88.0,
  "height": 36.0,
  "buttonColor": "#2196F3",
  "disabledColor": "#BDBDBD",
  "textTheme": "primary",
  "layoutBehavior": "padded",
  "alignedDropdown": false
}

{@end-tool}

Implemented types
Available extensions
Annotations
  • @JsonSerializable.new()

Constructors

StacButtonThemeData({StacButtonTextTheme? textTheme, double? minWidth, double? height, StacEdgeInsets? padding, StacShapeBorder? shape, StacButtonBarLayoutBehavior? layoutBehavior, bool? alignedDropdown, String? buttonColor, String? disabledColor, String? focusColor, String? hoverColor, String? highlightColor, String? splashColor, StacColorScheme? colorScheme, StacMaterialTapTargetSize? materialTapTargetSize})
Creates a StacButtonThemeData with the given properties.
const
StacButtonThemeData.fromJson(Map<String, dynamic> json)
Creates a StacButtonThemeData from JSON.
factory

Properties

alignedDropdown → bool?
Whether dropdown buttons should be aligned.
final
buttonColor → String?
The default background color for buttons.
final
colorScheme → StacColorScheme?
The color scheme to use for buttons.
final
disabledColor → String?
The color to use for disabled buttons.
final
focusColor → String?
The color to use when the button has input focus.
final
hashCode → int
The hash code for this object.
no setterinherited
height → double?
The height of the button.
final
highlightColor → String?
The highlight color for the button.
final
hoverColor → String?
The color to use when the button is being hovered over.
final
layoutBehavior → StacButtonBarLayoutBehavior?
The layout behavior for button bars.
final
materialTapTargetSize → StacMaterialTapTargetSize?
The minimum size of the tap target.
final
minWidth → double?
The minimum width of the button.
final
padding → StacEdgeInsets?
The internal padding for the button's content.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
shape → StacShapeBorder?
The shape of the button's border.
final
splashColor → String?
The splash color for the button.
final
textTheme → StacButtonTextTheme?
The text theme for button labels.
final

Methods

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

Available on StacButtonThemeData, provided by the StacButtonThemeDataParser extension

toJson() → Map<String, dynamic>
Converts this button theme to JSON.
override
toString() → String
A string representation of this object.
inherited

Operators

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