Fix: RubberBand missing 'infinite' support (Attention Seekers) / Corrección: Soporte 'infinite' faltante en RubberBand#51
Open
igbokwenu wants to merge 1 commit intoKlerith:masterfrom
Open
Conversation
- 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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description (English)
This PR fixes an issue where the
RubberBandanimation was missing theinfiniteproperty, causing it to differ from other "Attention Seeker" animations.The Issue:
While other Attention Seeker animations (such as
Bounce) correctly support theinfinite: trueproperty,RubberBanddid not define this parameter in its constructor. Additionally, the logic insideRubberBandStatehadinfinitehardcoded tofalse, causing the animation to stop after one cycle even if the user intended for it to loop.The Fix:
final bool infiniteto theRubberBandclass and constructor.configAnimationandbuildAnimationin the state to respect the passedinfinitevalue instead of usingfalse.rubberBandextension 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
RubberBandno incluía la propiedadinfinite, 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 propiedadinfinite: true,RubberBandno tenía definido este parámetro en su constructor. Además, la lógica dentro deRubberBandStatetenía el valorinfiniteestablecido directamente (hardcoded) enfalse, lo que impedía que la animación se repitiera en bucle.La Solución:
final bool infinitea la clase y al constructor deRubberBand.configAnimationybuildAnimationen el estado para respetar el valor deinfiniteen lugar de usarfalse.rubberBandpara aceptar y pasar el parámetro.Esto asegura la consistencia entre todas las animaciones de tipo Attention Seeker en el paquete.