Skip to content

Conversation

@oriventi
Copy link
Contributor

@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.

Copy link
Collaborator

@queendevelopers queendevelopers left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PR looks good except for the naming convention for enums.

@queendevelopers queendevelopers merged commit 24ab4d4 into aagarwal1012:master Jan 4, 2025
2 of 4 checks passed
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

4 participants