ButtonState class

Constructors

ButtonState({required StateId id, required Color color, Color? foregroundColor, Widget? child, StateWidgetBuilder? builder, bool isCompact = true})
const

Properties

builder → StateWidgetBuilder?
Builder para construir el contenido de forma dinámica.
final
child → Widget?
Contenido a mostrar (si no usas builder).
final
color → Color
Color de fondo del botón en este estado.
final
foregroundColor → Color?
Color sugerido para icono/texto del estado.
final
hashCode → int
The hash code for this object.
no setteroverride
id → StateId
Identificador único del estado (p.ej. 'loading', 'success', 'error', ...).
final
isCompact → bool
Si true, el botón se muestra en modo compacto (circular).
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

copyWith({StateId? id, Color? color, Color? foregroundColor, Widget? child, StateWidgetBuilder? builder, bool? isCompact}) → ButtonState
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() → StateId
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
override

Static Methods

error({Color color = Colors.red, Color fg = Colors.white, double iconSize = 24, bool isCompact = true, Widget? child}) → ButtonState
info({Color color = Colors.blueGrey, Color fg = Colors.white, double iconSize = 24, bool isCompact = true, Widget? child}) → ButtonState
loading({Color color = Colors.lightBlue, Color fg = Colors.white, double size = 22, double stroke = 3, bool isCompact = true, Widget? child}) → ButtonState
success({Color color = Colors.green, Color fg = Colors.white, double iconSize = 24, bool isCompact = true, Widget? child}) → ButtonState
warning({Color color = Colors.orange, Color fg = Colors.white, double iconSize = 24, bool isCompact = true, Widget? child}) → ButtonState