WaveSticksLoader class

Widget de carga animado con efecto de onda gaussiana.

Crea un loader con múltiples barras (sticks) que se animan siguiendo una distribución gaussiana, creando un efecto de onda suave que se mueve de izquierda a derecha.

El parámetro waveWidth controla el ancho de la onda gaussiana, garantizando que la animación siempre sea suave: la onda comienza y termina fuera del área visible, asegurando que los sticks visibles siempre tengan transiciones naturales.

Perfecto para:

  • Estados de carga elegantes
  • Visualizadores de audio
  • Efectos de progreso creativos
  • Indicadores de actividad

Ejemplo básico:

WaveSticksLoader(
  size: Size(350, 100),
  duration: Duration(milliseconds: 1500),
  numberOfSticks: 10,
  stickWidth: 5,
  stickHeight: 30,
  middleWaveStickHeight: 45,
  stickSpacing: 8,
  stickColor: Colors.blue,
  waveWidth: 1.5,
)

Ejemplo de visualizador de audio:

WaveSticksLoader(
  size: Size(400, 120),
  numberOfSticks: 20,
  stickWidth: 4,
  stickHeight: 20,
  middleWaveStickHeight: 60,
  stickColor: Colors.orange,
  waveWidth: 2.0,
)

Ver también:

Inheritance

Constructors

WaveSticksLoader({Key? key, WaveStickAnimationController? controller, Duration duration = const Duration(milliseconds: 1500), Size size = const Size(100, 50), int numberOfSticks = 5, double stickWidth = 5.0, double stickHeight = 20.0, double middleWaveStickHeight = 30.0, Color stickColor = Colors.blue, double stickSpacing = 5.0, CrossAxisAlignment alignment = CrossAxisAlignment.center, double waveWidth = 1.5, double radius = 2.5})
const

Properties

alignment CrossAxisAlignment
Alineación vertical de los sticks dentro del contenedor.
final
controller WaveStickAnimationController?
Controller opcional para controlar manualmente la animación.
final
duration Duration
Duración de un ciclo completo de la animación.
final
hashCode int
The hash code for this object.
no setterinherited
key Key?
Controls how one widget replaces another widget in the tree.
finalinherited
middleWaveStickHeight double
Altura máxima que alcanza el stick en el centro de la onda.
final
numberOfSticks int
Número de barras verticales (sticks) a mostrar.
final
radius double
Radio de las esquinas de cada stick.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
size Size
Tamaño total del contenedor del loader.
final
stickColor Color
Color de los sticks.
final
stickHeight double
Altura mínima de los sticks cuando están en reposo.
final
stickSpacing double
Espacio horizontal entre sticks en píxeles.
final
stickWidth double
Ancho de cada stick individual en píxeles.
final
waveWidth double
Controla el ancho de la onda gaussiana.
final

Methods

createElement() StatefulElement
Creates a StatefulElement to manage this widget's location in the tree.
inherited
createState() State<WaveSticksLoader>
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