ButtonStyleExtension extension

Extension methods on AbstractButtonStyle for convenient style modifications.

Provides utility methods to create modified copies of button styles with selective property changes. These methods enable fluent style customization without manually implementing ButtonVariance instances.

on

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.
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.