MoonButton class

Inheritance

Constructors

MoonButton({Key? key, bool autofocus = false, bool isFocusable = true, bool ensureMinimalTouchTargetSize = false, bool isFullWidth = false, bool showBorder = false, bool showFocusEffect = true, bool showPulseEffect = false, bool showPulseEffectJiggle = true, bool showScaleEffect = true, BorderRadiusGeometry? borderRadius, Color? backgroundColor, Color? borderColor, Color? focusEffectColor, Color? hoverEffectColor, Color? pulseEffectColor, Color? textColor, Color? hoverTextColor, Decoration? decoration, double? borderWidth, double? disabledOpacityValue, double? gap, double? height, double? width, double minTouchTargetSize = 40, double? focusEffectExtent, double? pulseEffectExtent, double? scaleEffectScalar, Duration? focusEffectDuration, Duration? hoverEffectDuration, Duration? pulseEffectDuration, Duration? scaleEffectDuration, Curve? focusEffectCurve, Curve? hoverEffectCurve, Curve? pulseEffectCurve, Curve? scaleEffectCurve, EdgeInsetsGeometry? padding, FocusNode? focusNode, MoonButtonSize? buttonSize, String? semanticLabel, VoidCallback? onTap, VoidCallback? onLongPress, Widget? leading, Widget? label, Widget? trailing})
Creates a Moon Design base button.
const
MoonButton.icon({Key? key, bool autofocus = false, bool isFocusable = true, bool ensureMinimalTouchTargetSize = false, bool isFullWidth = false, bool showBorder = false, bool showFocusEffect = true, bool showPulseEffect = false, bool showPulseEffectJiggle = true, bool showScaleEffect = true, BorderRadiusGeometry? borderRadius, Color? backgroundColor, Color? borderColor, Color? focusEffectColor, Color? hoverEffectColor, Color? pulseEffectColor, Color? hoverTextColor, double? borderWidth, double? disabledOpacityValue, double? gap, double? height, double? width, double minTouchTargetSize = 40, double? focusEffectExtent, double? pulseEffectExtent, double? scaleEffectScalar, Duration? focusEffectDuration, Duration? hoverEffectDuration, Duration? pulseEffectDuration, Duration? scaleEffectDuration, Curve? focusEffectCurve, Curve? hoverEffectCurve, Curve? pulseEffectCurve, Curve? scaleEffectCurve, EdgeInsetsGeometry? padding, FocusNode? focusNode, MoonButtonSize? buttonSize, Decoration? decoration, String? semanticLabel, VoidCallback? onTap, VoidCallback? onLongPress, Color? iconColor, Widget? icon})
Creates a Moon Design icon button.
const

Properties

autofocus bool
True if this widget will be selected as the initial focus when no other node in its scope is currently focused.
final
backgroundColor Color?
The background color of the button.
final
borderColor Color?
The border color of the button.
final
borderRadius BorderRadiusGeometry?
The border radius of the button.
final
borderWidth double?
The border width of the button.
final
buttonSize MoonButtonSize?
The size of the button.
final
decoration Decoration?
The custom decoration of the button.
final
disabledOpacityValue double?
The opacity value of the button when disabled.
final
ensureMinimalTouchTargetSize bool
Whether to ensure a minimum touch target size for the button.
final
focusEffectColor Color?
The color of the button focus effect.
final
focusEffectCurve Curve?
The curve of the button focus effect.
final
focusEffectDuration Duration?
The duration of the button focus effect.
final
focusEffectExtent double?
The extent of the button focus effect.
final
focusNode FocusNode?
An optional focus node to use as the focus node for this widget.
final
gap double?
The gap between the leading, label and trailing widgets of the button.
final
hashCode int
The hash code for this object.
no setterinherited
height double?
The height of the button.
final
hoverEffectColor Color?
The color of the button hover effect.
final
hoverEffectCurve Curve?
The curve of the button hover effect.
final
hoverEffectDuration Duration?
The duration of the button hover effect.
final
hoverTextColor Color?
The text color of the button on hover.
final
isFocusable bool
Whether the button is focusable.
final
isFullWidth bool
Whether the button takes up the full width of its parent container.
final
key Key?
Controls how one widget replaces another widget in the tree.
finalinherited
label Widget?
The primary content of the button widget.
final
leading Widget?
The widget to display before the label widget of the button.
final
minTouchTargetSize double
The minimum size of the button touch target.
final
onLongPress VoidCallback?
The callback that is called when the button is long-pressed.
final
onTap VoidCallback?
The callback that is called when the button is tapped or pressed.
final
padding EdgeInsetsGeometry?
The padding of the button.
final
pulseEffectColor Color?
The color of the button pulse effect.
final
pulseEffectCurve Curve?
The curve of the button pulse effect.
final
pulseEffectDuration Duration?
The duration of the button pulse effect.
final
pulseEffectExtent double?
The extent of the button pulse effect.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
scaleEffectCurve Curve?
The curve of the button scale effect.
final
scaleEffectDuration Duration?
The duration of the button scale effect.
final
scaleEffectScalar double?
The degree of scaling applied during the button scale effect.
final
semanticLabel String?
The semantic label for the button.
final
showBorder bool
Whether to show a border around the button.
final
showFocusEffect bool
Whether to show a focus outline effect when the button is focused.
final
showPulseEffect bool
Whether to show a continuous pulsating effect.
final
showPulseEffectJiggle bool
Whether to show a jiggle during the button pulse effect.
final
showScaleEffect bool
Whether to show a scale effect when the button is tapped or long-pressed.
final
textColor Color?
The text color of the button.
final
trailing Widget?
The widget to display after the label widget of the button.
final
width double?
The width of the button.
final

Methods

createElement() StatefulElement
Creates a StatefulElement to manage this widget's location in the tree.
inherited
createState() State<MoonButton>
Creates the mutable state for this widget at a given location in the tree.
override
debugDescribeChildren() List<DiagnosticsNode>
Returns a list of DiagnosticsNode objects describing this node's children.
inherited
debugFillProperties(DiagnosticPropertiesBuilder properties) → void
Add additional properties associated with the node.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toDiagnosticsNode({String? name, DiagnosticsTreeStyle? style}) DiagnosticsNode
Returns a debug representation of the object that is used by debugging tools and by DiagnosticsNode.toStringDeep.
inherited
toString({DiagnosticLevel minLevel = DiagnosticLevel.info}) String
A string representation of this object.
inherited
toStringDeep({String prefixLineOne = '', String? prefixOtherLines, DiagnosticLevel minLevel = DiagnosticLevel.debug}) String
Returns a string representation of this node and its descendants.
inherited
toStringShallow({String joiner = ', ', DiagnosticLevel minLevel = DiagnosticLevel.debug}) String
Returns a one-line detailed description of the object.
inherited
toStringShort() String
A short, textual description of this widget.
inherited

Operators

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