AnimatedButton class

Main animated button widget with various animation types and customization options

Inheritance

Constructors

AnimatedButton({Key? key, required Widget child, required VoidCallback? onPressed, Color color = Colors.green, Color? glowColor, double? width, double? height, double size = 60.0, double glowIntensity = 0.6, Duration? animationDuration, ButtonAnimationType animationType = ButtonAnimationType.glow, bool repeatAnimation = true, double borderRadius = 30.0, bool enableScaleAnimation = true, double elevation = 4.0, Gradient? gradient, bool enabled = true, EdgeInsetsGeometry? padding, EdgeInsetsGeometry? margin})
const
AnimatedButton.circular({Key? key, required Widget child, required VoidCallback? onPressed, Color color = Colors.green, Color? glowColor, double size = 60.0, double glowIntensity = 0.8, Duration? animationDuration, bool enabled = true})
Factory constructor for a circular button similar to the image
factory
AnimatedButton.rectangular({Key? key, required Widget child, required VoidCallback? onPressed, Color color = Colors.blue, Color? glowColor, double width = 120.0, double height = 50.0, double glowIntensity = 0.6, Duration? animationDuration, double borderRadius = 12.0, bool enabled = true, EdgeInsetsGeometry? padding})
Factory constructor for a rectangular button
factory

Properties

animationDuration → Duration?
The duration of the glow animation
final
animationType → ButtonAnimationType
The type of animation to use
final
borderRadius → double
The border radius of the button
final
child → Widget
The child widget to display inside the button
final
color → Color
The primary color of the button
final
elevation → double
The elevation of the button
final
enabled → bool
Whether the button is enabled
final
enableScaleAnimation → bool
Whether to show a scale animation on press
final
glowColor → Color?
The glow color (defaults to button color with opacity)
final
glowIntensity → double
The intensity of the glow effect (0.0 to 1.0)
final
gradient → Gradient?
Custom gradient for the button background
final
hashCode → int
The hash code for this object.
no setterinherited
height → double?
The height of the button (if null, uses size for both width and height)
final
key → Key?
Controls how one widget replaces another widget in the tree.
finalinherited
margin → EdgeInsetsGeometry?
Custom margin around the button
final
onPressed → VoidCallback?
The callback function when the button is pressed
final
padding → EdgeInsetsGeometry?
Custom padding inside the button
final
repeatAnimation → bool
Whether the glow animation should repeat
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
size → double
The size of the button (used when width/height are null)
final
width → double?
The width of the button (if null, uses size for both width and height)
final

Methods

createElement() → StatefulElement
Creates a StatefulElement to manage this widget's location in the tree.
inherited
createState() → State<AnimatedButton>
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, int wrapWidth = 65}) → 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