WxDrivenButtonStyle class

Create a WxButtonStyle when some events occurs

Inheritance
Implemented types

Constructors

WxDrivenButtonStyle({WxSheetVariant? variant, WxSheetSize? size, Color? severity, double? width, double? height, double? minWidth, double? maxWidth, double? minHeight, double? maxHeight, EdgeInsetsGeometry? margin, EdgeInsetsGeometry? padding, double? spacing, bool? adaptiveSpacing, Offset? offset, double? scale, double? rotate, bool? flipX, bool? flipY, double? opacity, Alignment? alignment, Clip? clipBehavior, Color? overlayColor, double? overlayOpacity, ShapeBorder? overlayShape, Size? overlayExtent, Color? surfaceTint, Color? elevationColor, double? elevation, CrossAxisAlignment? tileAlign, MainAxisAlignment? tileJustify, bool? tileWrap, TextStyle? textStyle, TextAlign? textAlign, double? textSpacing, Color? textColor, TextOverflow? textOverflow, bool? textSoftWrap, TextWidthBasis? textWidthBasis, Color? foregroundColor, double? foregroundOpacity, int? foregroundAlpha, Color? backgroundColor, double? backgroundOpacity, int? backgroundAlpha, Color? borderColor, double? borderOpacity, int? borderAlpha, double? borderWidth, BorderRadius? borderRadius, BorderStyle? borderStyle, double? borderOffset, OutlinedBorder? border, DecorationImage? image, List<BoxShadow>? shadows, Gradient? gradient, Color? iconColor, double? iconOpacity, double? iconSize, Color? checkmarkColor, double? checkmarkSize, double? checkmarkWeight, Color? spinnerColor, Color? spinnerBackgroundColor, double? spinnerSize, double? spinnerWidth, bool? spinnerRounded, TextStyle? titleStyle, TextStyle? subtitleStyle, double? titleSize, double? subtitleSize, Color? titleColor, Color? subtitleColor, int? titleMaxLines, int? subtitleMaxLines, FontWeight? titleWeight, FontWeight? subtitleWeight, WxButtonStyle? focusedStyle, WxButtonStyle? hoveredStyle, WxButtonStyle? pressedStyle, WxButtonStyle? loadingStyle, WxButtonStyle? disabledStyle, bool? inherits})
Create a raw WxDrivenButtonStyle.
const
WxDrivenButtonStyle.from(WxDrivenButtonStyle? other)
Create a WxDrivenButtonStyle with value from another WxDrivenButtonStyle.
WxDrivenButtonStyle.fromAncestor(WxButtonStyle? enabled, {WxButtonStyle? focusedStyle, WxButtonStyle? hoveredStyle, WxButtonStyle? pressedStyle, WxButtonStyle? loadingStyle, WxButtonStyle? disabledStyle, bool? inherits})
Create a WxDrivenButtonStyle with value from another WxButtonStyle.
WxDrivenButtonStyle.resolver(WxDrivenSheetStyleResolver<WxButtonStyle?> resolver, {bool? inherits = false})
Create a WxDrivenButtonStyle from a resolver callback

Properties

adaptiveForegroundColor bool?
Whether the foreground color is adaptive to background color.
finalinherited
adaptiveSpacing bool?
Whether the spacing is forced to child with no leading or trailing.
finalinherited
alignment Alignment?
Align the child within the sheet.
finalinherited
backgroundAlpha int?
Alpha to be apply to backgroundColor.
finalinherited
backgroundColor Color?
Color to be used for the sheet's background.
finalinherited
backgroundOpacity double?
Opacity to be apply to backgroundColor.
finalinherited
border OutlinedBorder?
A border to draw.
finalinherited
borderAlpha int?
Alpha to be apply to borderColor.
finalinherited
borderColor Color?
Color to be used for the sheet's border.
finalinherited
borderOffset double?
The relative position of the stroke on a BorderSide in an OutlinedBorder or Border.
finalinherited
borderOpacity double?
Opacity to be apply to borderColor.
finalinherited
borderRadius BorderRadius?
The radii for each corner of the sheet's border.
finalinherited
borderStyle BorderStyle?
The style of this side of the sheet's border.
finalinherited
borderWidth double?
The width of this side of the sheet's border, in logical pixels.
finalinherited
checkmarkColor Color?
The color of the checkmark.
finalinherited
checkmarkRounded bool?
Whether the checkmark has rounded edges.
finalinherited
checkmarkSize double?
The size of the checkmark. If null, the checkmark expands to fit its parent.
finalinherited
checkmarkWeight double?
The stroke width of the checkmark.
finalinherited
clipBehavior Clip?
The sheet's content will be clipped (or not) according to this option.
finalinherited
constraints BoxConstraints
constraints to apply to the sheet widget
no setterinherited
direction Axis?
The direction to use as the main axis.
finalinherited
disabledStyle WxButtonStyle?
The style to be applied when the widget is disabled.
final
driven Map<WxSheetEvent, WxButtonStyle?>
A map of driven styles, ordered by their priority.
no setterinherited
elevation double?
The sheet's z-coordinate relative to the parent at which to place this physical object.
finalinherited
elevationColor Color?
When elevation is non zero the color to use for the sheet's shadow color.
finalinherited
flipX bool?
Controls whether the sheet widget is flipped horizontally (mirrored). Setting flipX to true will cause the sheet to be displayed as if reflected across a vertical axis.
finalinherited
flipY bool?
Controls whether the sheet widget is flipped vertically (inverted). Setting flipY to true will cause the sheet to be displayed as if reflected across a horizontal axis.
finalinherited
focusedStyle WxButtonStyle?
The style to be applied when the widget has focus.
final
foregroundAlpha int?
Alpha to be apply to foregroundColor.
finalinherited
foregroundColor Color?
The color to be applied to the sheet's label, and icon
finalinherited
foregroundOpacity double?
Opacity to be apply to foregroundColor.
finalinherited
gradient Gradient?
A gradient to use when filling the shape.
finalinherited
hashCode int
The hash code for this object.
no setterinherited
height double?
The vertical extent of the sheet widget.
finalinherited
hoveredStyle WxButtonStyle?
The style to be applied when the mouse hovers over the widget.
final
iconColor Color?
Color to be used for the icon's inside the sheet.
finalinherited
iconOpacity double?
Opacity to be apply to iconColor.
finalinherited
iconSize double?
The size of the icon's inside the sheet, in logical pixels.
finalinherited
image DecorationImage?
An image to paint inside the shape (clipped to its outline).
finalinherited
indeterminateStyle WxButtonStyle?
The style to be applied when the widget is in an indeterminate state.
no setterinherited
inherits bool?
Whether the resolved style should be merged with the previous resolved style.
final
isElevated bool
Whether or not this is elevated variant
no setterinherited
isFilled bool
Whether or not this is filled variant
no setterinherited
isOutlined bool
Whether or not this is outlined variant
no setterinherited
isText bool
Whether or not this is text variant
no setterinherited
isTonal bool
Whether or not this is tonal variant
no setterinherited
loadingStyle WxButtonStyle?
The style to be applied when the widget is loading.
final
margin EdgeInsetsGeometry?
Empty space to surround the outside sheet.
finalinherited
maxHeight double?
The maximum height of the sheet widget
finalinherited
maxWidth double?
The maximum width of the sheet widget
finalinherited
minHeight double?
The minimum height of the sheet widget
finalinherited
minWidth double?
The minimum width of the sheet widget
finalinherited
offset Offset?
Adjust the size of the sheet relative to its original size. A value of 1 maintains the original size, while values greater than 1 enlarge and values less than 1 shrink the element.
finalinherited
opacity double?
The sheet opacity when pressed, hovered over, or focused.
finalinherited
overlayColor Color?
Defines the overlay colors.
finalinherited
overlayExtent Size?
The extent of the overlay.
finalinherited
overlayOpacity double?
Opacity to be apply to overlayColor.
finalinherited
overlayShape ShapeBorder?
The shape (e.g., circle, rectangle) to use for the overlay drawn around this part of the anchor when pressed, hovered over, or focused.
finalinherited
padding EdgeInsetsGeometry?
The padding between the contents of the sheet and the outside sheet.
finalinherited
pressedStyle WxButtonStyle?
The style to be applied when the widget is pressed.
final
rotate double?
Rotates sheet element by a specified number of degrees. Use a positive value for clockwise rotation or a negative value for counter-clockwise rotation.
finalinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
scale double?
Adjust the size of the sheet relative to its original size. A value of 1 maintains the original size, while values greater than 1 enlarge and values less than 1 shrink the element.
finalinherited
selectedStyle WxButtonStyle?
The style to be applied when the widget is selected.
no setterinherited
severity Color?
Type of the sheet severity
finalinherited
shadows List<BoxShadow>?
A list of shadows cast by the border.
finalinherited
shape ShapeBorder
Returns a ShapeBorder instance by combining and overriding properties from the given parameters.
no setterinherited
size → WxSheetSize?
Type of the sheet size
finalinherited
spacing double?
How much space to place between sheet's foreground widget in a run in the main axis.
finalinherited
spinnerBackgroundColor Color?
Color to be used for the spinner's background inside the sheet.
finalinherited
spinnerColor Color?
Color to be used for the spinner's inside the sheet.
finalinherited
spinnerRounded bool?
Whether the spinner's stroke is rounded.
finalinherited
spinnerSize double?
The size of the spinner's inside the sheet.
finalinherited
spinnerWidth double?
The width of the spinner's stoke inside the sheet.
finalinherited
subtitleColor Color?
The text color to be applied to subtitle.
finalinherited
subtitleMaxLines int?
The text max lines to be applied to subtitle.
finalinherited
subtitleSize double?
The font size to be applied to title.
finalinherited
subtitleStyle TextStyle?
The text style to be applied to subtitle.
finalinherited
subtitleWeight FontWeight?
The font weight to be applied to subtitle.
finalinherited
surfaceTint Color?
The color used as an overlay on color to indicate elevation.
finalinherited
textAlign TextAlign?
The align to be applied to the sheet's label. This only has an effect on widgets that respect the DefaultTextStyle, such as Text.
finalinherited
textColor Color?
The text color to be applied to title and subtitle.
finalinherited
textOverflow TextOverflow?
The text overflow to be applied to title and subtitle.
finalinherited
textSoftWrap bool?
The text softWrap to be applied to title and subtitle.
finalinherited
textSpacing double?
The gap between the title and the subtitle widgets.
finalinherited
textStyle TextStyle?
The style to be applied to the sheet's label.
finalinherited
textWidthBasis TextWidthBasis?
The text width basis to be applied to title and subtitle.
finalinherited
tileAlign CrossAxisAlignment?
Cross axis alignment of the foreground widget
finalinherited
tileJustify MainAxisAlignment?
Main axis alignment of the foreground widget
finalinherited
tileWrap bool?
Controls how the child widget or (title and subtitle) fills its available space (expand or wrap content).
finalinherited
titleColor Color?
The text color to be applied to title.
finalinherited
titleMaxLines int?
The text max lines to be applied to title.
finalinherited
titleSize double?
The font size to be applied to title.
finalinherited
titleStyle TextStyle?
The text style to be applied to title.
finalinherited
titleWeight FontWeight?
The font weight to be applied to title.
finalinherited
variant → WxSheetVariant?
Type of the sheet variant
finalinherited
width double?
The horizontal extent of the sheet widget.
finalinherited

Methods

asBlock({bool? tileWrap, CrossAxisAlignment? tileAlign, MainAxisAlignment? tileJustify, double? spacing}) → WxSheetStyle
Creates a copy of this WxSheetStyle but with the width replaced with double.infinity.
inherited
asCircle({double? radius, double? minRadius, double? maxRadius}) → WxSheetStyle
Creates a copy of this WxSheetStyle but with padding is EdgeInsets.zero and squared size.
inherited
copyWith({Axis? direction, WxSheetVariant? variant, WxSheetSize? size, Color? severity, double? width, double? height, double? minWidth, double? maxWidth, double? minHeight, double? maxHeight, EdgeInsetsGeometry? margin, EdgeInsetsGeometry? padding, double? spacing, bool? adaptiveSpacing, Offset? offset, double? scale, double? rotate, bool? flipX, bool? flipY, double? opacity, Alignment? alignment, Clip? clipBehavior, Color? overlayColor, double? overlayOpacity, ShapeBorder? overlayShape, Size? overlayExtent, Color? surfaceTint, Color? elevationColor, double? elevation, CrossAxisAlignment? tileAlign, MainAxisAlignment? tileJustify, bool? tileWrap, TextStyle? textStyle, TextAlign? textAlign, double? textSpacing, Color? textColor, TextOverflow? textOverflow, bool? textSoftWrap, TextWidthBasis? textWidthBasis, bool? adaptiveForegroundColor, Color? foregroundColor, double? foregroundOpacity, int? foregroundAlpha, Color? backgroundColor, double? backgroundOpacity, int? backgroundAlpha, Color? borderColor, double? borderOpacity, int? borderAlpha, double? borderWidth, BorderRadius? borderRadius, BorderStyle? borderStyle, double? borderOffset, OutlinedBorder? border, DecorationImage? image, List<BoxShadow>? shadows, Gradient? gradient, Color? iconColor, double? iconOpacity, double? iconSize, Color? checkmarkColor, double? checkmarkSize, double? checkmarkWeight, Color? spinnerColor, Color? spinnerBackgroundColor, double? spinnerSize, double? spinnerWidth, bool? spinnerRounded, TextStyle? titleStyle, TextStyle? subtitleStyle, double? titleSize, double? subtitleSize, Color? titleColor, Color? subtitleColor, int? titleMaxLines, int? subtitleMaxLines, FontWeight? titleWeight, FontWeight? subtitleWeight, bool? inherits, WxButtonStyle? focusedStyle, WxButtonStyle? hoveredStyle, WxButtonStyle? pressedStyle, WxButtonStyle? loadingStyle, WxButtonStyle? disabledStyle}) WxDrivenButtonStyle
Creates a copy of this WxDrivenButtonStyle but with the given fields replaced with the new values.
override
debugFillDrivenStyle(DiagnosticPropertiesBuilder properties) → void
Fills the given diagnostic properties builder with information about the driven style.
inherited
debugFillProperties(DiagnosticPropertiesBuilder properties) → void
Add additional properties associated with the node.
merge(WxSheetStyle? other) WxDrivenButtonStyle
Creates a copy of this WxSheetStyle but with the given fields replaced with the new values.
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
resolve(Set<WidgetEvent> events) WxButtonStyle
Resolves the final style based on the given events.
inherited
resolveInherits(WxButtonStyle accumulator, WxButtonStyle? style) WxButtonStyle
Resolves the final style based on the accumulator and the given style.
toDiagnosticsNode({String? name, DiagnosticsTreeStyle? style}) DiagnosticsNode
Returns a debug representation of the object that is used by debugging tools and by DiagnosticsNode.toStringDeep.
inherited
toMap() Map<String, dynamic>
inherited
toString({DiagnosticLevel minLevel = DiagnosticLevel.info}) String
A string representation of this object.
inherited
toStringShort() String
A brief description of this object, usually just the runtimeType and the hashCode.
inherited

Operators

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

Static Methods

evaluate(WxButtonStyle value, Set<WxSheetEvent> events) WxButtonStyle
Resolves the value for the given set of events if value is an event driven WxButtonStyle, otherwise returns the value itself.
override