AnimatedStateButton class
- Inheritance
-
- Object
- DiagnosticableTree
- Widget
- StatefulWidget
- AnimatedStateButton
Constructors
-
AnimatedStateButton({Key? key, double? width, required AnimatedStateButtonController controller, Future<
void> onClick()?, @Deprecated('Usa onClick en su lugar') Future<void> onPressed()?, Widget? initChild, Color initColor = Colors.black, double borderRadius = 8, EdgeInsetsGeometry padding = const EdgeInsets.symmetric(horizontal: 24.0, vertical: 16), double height = 48, double compactSize = 48, Duration animationDuration = const Duration(milliseconds: 400), Curve animationCurve = Curves.easeInOut, Duration switchDuration = const Duration(milliseconds: 300), Curve switchInCurve = Curves.easeOut, Curve switchOutCurve = Curves.easeIn, ButtonStyle? buttonStyle, bool enabled = true, double? elevation, Color? shadowColor, double hoverScale = .02, double pressScale = .04}) -
const
-
AnimatedStateButton.simple({Key? key, required Future<
void> onAction(), Widget? label, Color initColor = Colors.black, double borderRadius = 8, double height = 48, double compactSize = 48, Duration animationDuration = const Duration(milliseconds: 400), Curve animationCurve = Curves.easeInOut, Duration switchDuration = const Duration(milliseconds: 300), Curve switchInCurve = Curves.easeOut, Curve switchOutCurve = Curves.easeIn, ButtonStyle? buttonStyle, bool enabled = true, double hoverScale = .02, double pressScale = .04, double? width, EdgeInsetsGeometry padding = const EdgeInsets.symmetric(horizontal: 24.0, vertical: 16), void onStateChanged(StateId newStateId)?, Duration autoResetDelay = const Duration(milliseconds: 600), double? elevation, Color? shadowColor}) -
Factory simple sin armar controller a mano.
factory
Properties
- animationCurve → Curve
-
final
- animationDuration → Duration
-
Duración/curva del contenedor animado.
final
- borderRadius → double
-
Radio en
init.final -
Estilo del FilledButton en
init.final - compactSize → double
-
Tamaño del botón cuando está compacto (círculo).
final
- controller → AnimatedStateButtonController
-
Controlador (en factory
simplese crea interno).final - elevation → double?
-
Sombras del contenedor animado (no del FilledButton).
final
- enabled → bool
-
Habilitado/deshabilitado.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- height → double
-
Altura constante del botón.
final
- hoverScale → double
-
Micro-interacciones: escala en hover y press.
final
- initChild → Widget?
-
Contenido del estado inicial.
final
- initColor → Color
-
Color de fondo en
init.final - key → Key?
-
Controls how one widget replaces another widget in the tree.
finalinherited
-
onClick
→ Future<
void> Function()? -
Acción al presionar (en estado init).
final
-
onPressed
→ Future<
void> Function()? -
Alias por compatibilidad.
final
- padding → EdgeInsetsGeometry
-
Padding exterior (alrededor del contenedor animado).
final
- pressScale → double
-
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- shadowColor → Color?
-
final
- switchDuration → Duration
-
Duración/curvas del AnimatedSwitcher.
final
- switchInCurve → Curve
-
final
- switchOutCurve → Curve
-
final
- width → double?
-
Ancho del botón en estado inicial (si null, usa el ancho disponible).
final
Methods
-
createElement(
) → StatefulElement -
Creates a StatefulElement to manage this widget's location in the tree.
inherited
-
createState(
) → State< AnimatedStateButton> -
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