AbstractButtonStyle class abstract
Abstract interface defining the style properties for button components.
AbstractButtonStyle specifies the contract for button styling, requiring implementations to provide state-dependent values for decoration, cursor, padding, text style, icon theme, and margin. This abstraction allows for flexible button theming while maintaining a consistent API.
All properties return ButtonStateProperty functions that resolve values based on the button's current interactive state (hovered, pressed, focused, etc.).
Implementations include ButtonStyle and ButtonVariance, which provide concrete styling configurations for different button types.
- Implementers
- Available extensions
Constructors
Properties
-
decoration
→ ButtonStateProperty<
Decoration> -
Returns the decoration (background, border, shadows) based on button state.
no setter
- hashCode → int
-
The hash code for this object.
no setterinherited
-
iconTheme
→ ButtonStateProperty<
IconThemeData> -
Returns the icon theme based on button state.
no setter
-
margin
→ ButtonStateProperty<
EdgeInsetsGeometry> -
Returns the external margin based on button state.
no setter
-
mouseCursor
→ ButtonStateProperty<
MouseCursor> -
Returns the mouse cursor appearance based on button state.
no setter
-
padding
→ ButtonStateProperty<
EdgeInsetsGeometry> -
Returns the internal padding based on button state.
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
-
textStyle
→ ButtonStateProperty<
TextStyle> -
Returns the text style based on button state.
no setter
Methods
-
copyWith(
{ButtonStatePropertyDelegate< Decoration> ? decoration, ButtonStatePropertyDelegate<MouseCursor> ? mouseCursor, ButtonStatePropertyDelegate<EdgeInsetsGeometry> ? padding, ButtonStatePropertyDelegate<TextStyle> ? textStyle, ButtonStatePropertyDelegate<IconThemeData> ? iconTheme, ButtonStatePropertyDelegate<EdgeInsetsGeometry> ? margin}) → AbstractButtonStyle -
Available on AbstractButtonStyle, provided by the ButtonStyleExtension extension
Creates a copy of this style with selectively replaced properties. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
-
withBackgroundColor(
{Color? color, Color? hoverColor, Color? focusColor, Color? disabledColor}) → AbstractButtonStyle -
Available on AbstractButtonStyle, provided by the ButtonStyleExtension extension
Creates a copy with custom background colors for different states. -
withBorder(
{Border? border, Border? hoverBorder, Border? focusBorder, Border? disabledBorder}) → AbstractButtonStyle -
Available on AbstractButtonStyle, provided by the ButtonStyleExtension extension
Creates a copy with custom borders for different states. -
withBorderRadius(
{BorderRadiusGeometry? borderRadius, BorderRadiusGeometry? hoverBorderRadius, BorderRadiusGeometry? focusBorderRadius, BorderRadiusGeometry? disabledBorderRadius}) → AbstractButtonStyle -
Available on AbstractButtonStyle, provided by the ButtonStyleExtension extension
Creates a copy with custom border radius for different states. -
withForegroundColor(
{Color? color, Color? hoverColor, Color? focusColor, Color? disabledColor}) → AbstractButtonStyle -
Available on AbstractButtonStyle, provided by the ButtonStyleExtension extension
Creates a copy with custom foreground colors for different states. -
withPadding(
{EdgeInsetsGeometry? padding, EdgeInsetsGeometry? hoverPadding, EdgeInsetsGeometry? focusPadding, EdgeInsetsGeometry? disabledPadding}) → AbstractButtonStyle -
Available on AbstractButtonStyle, provided by the ButtonStyleExtension extension
Creates a copy with custom padding for different states.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited