Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Introducing AnimatedTextController for animation control. #349

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

oriventi
Copy link

@oriventi oriventi commented Dec 12, 2024

Summary

This pull request introduces a new AnimatedTextController to make it possible to control animations in AnimatedTextKit. The controller provides methods like play(), pause(), and reset(), and manages the animation state internally, including handling and respecting the pauses between animations.

Features

  • The controller manages animation states without exposing the AnimationController directly
  • Introduces new states to handle user pauses and between-animation pauses
  • Allows programmatic control of animations and also simplifies state management
final controller = AnimatedTextController();

AnimatedTextKit(
  animatedTexts: [
    FadeAnimatedText('Hello'),
    FadeAnimatedText('World'),
  ],
  controller: controller,
);

controller.pause();

controller.play();

controller.reset();

Additional stuff

  • I updated the example app to make use of the AnimatedTextController too.
  • I added tests for the controller

Fix

It fixes #346 and fixes #337

@JulienElkaim
Copy link

Great add ! However, it seems the project is dead since 2 years... ? :/
Would be great to have an alternative with active support.

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.

Animation control with AnimationController Controller Request
2 participants