Skip to content

Fix: RubberBand missing 'infinite' support (Attention Seekers) / Corrección: Soporte 'infinite' faltante en RubberBand#51

Open
igbokwenu wants to merge 1 commit intoKlerith:masterfrom
igbokwenu:master
Open

Fix: RubberBand missing 'infinite' support (Attention Seekers) / Corrección: Soporte 'infinite' faltante en RubberBand#51
igbokwenu wants to merge 1 commit intoKlerith:masterfrom
igbokwenu:master

Conversation

@igbokwenu
Copy link

Description (English)

This PR fixes an issue where the RubberBand animation was missing the infinite property, causing it to differ from other "Attention Seeker" animations.

The Issue:
While other Attention Seeker animations (such as Bounce) correctly support the infinite: true property, RubberBand did not define this parameter in its constructor. Additionally, the logic inside RubberBandState had infinite hardcoded to false, causing the animation to stop after one cycle even if the user intended for it to loop.

The Fix:

  1. Added final bool infinite to the RubberBand class and constructor.
  2. Updated configAnimation and buildAnimation in the state to respect the passed infinite value instead of using false.
  3. Updated the rubberBand extension method to accept and pass the parameter.

This ensures consistency across all Attention Seeker animations in the package.


Descripción (Español)

Este PR corrige un problema donde la animación RubberBand no incluía la propiedad infinite, lo que causaba inconsistencia con otras animaciones del tipo "Attention Seeker".

El Problema:
Mientras que otras animaciones de "Attention Seeker" (como Bounce) soportan correctamente la propiedad infinite: true, RubberBand no tenía definido este parámetro en su constructor. Además, la lógica dentro de RubberBandState tenía el valor infinite establecido directamente (hardcoded) en false, lo que impedía que la animación se repitiera en bucle.

La Solución:

  1. Se agregó final bool infinite a la clase y al constructor de RubberBand.
  2. Se actualizaron configAnimation y buildAnimation en el estado para respetar el valor de infinite en lugar de usar false.
  3. Se actualizó el método de extensión rubberBand para aceptar y pasar el parámetro.

Esto asegura la consistencia entre todas las animaciones de tipo Attention Seeker en el paquete.

- Added infinite property to RubberBand class
- Added infinite parameter to constructor with default value false
- Updated configAnimation and buildAnimation calls to use widget.infinite
- Updated RubberBandExtension to pass infinite parameter

Fixes issue where infinite parameter was documented but not implemented
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant