Skip to content

feat: Enhanced MeshGradientController with Integrated Sequence Repetition#25

Closed
msamoeed wants to merge 9 commits into
ben-fornefeld:mainfrom
msamoeed:main
Closed

feat: Enhanced MeshGradientController with Integrated Sequence Repetition#25
msamoeed wants to merge 9 commits into
ben-fornefeld:mainfrom
msamoeed:main

Conversation

@msamoeed
Copy link
Copy Markdown

Enhanced MeshGradientController with Integrated Sequence Repetition

Changes

  • Modified animateSequence method to include repeatCount and pauseBetweenRepeats parameters
  • Integrated sequence repetition functionality directly into animateSequence
  • Removed separate repeatSequenceAnimation method
  • Refactored animateSequence for better code organization and reusability

Motivation

This update streamlines the API for animating mesh gradient sequences by incorporating repetition functionality directly into the animateSequence method. It simplifies usage and reduces code duplication while maintaining flexibility for complex animations.

Impact

  • Improved API consistency and ease of use
  • Enhanced control over sequence animations with built-in repetition
  • Reduced method count in the controller class

Usage Example

controller.animateSequence(
  duration: Duration(seconds: 2),
  sequences: [/* ... */],
  repeatCount: 3,
  pauseBetweenRepeats: Duration(milliseconds: 500),
);

This PR enhances the MeshGradientController's capabilities while simplifying its interface, making it more intuitive for developers to create complex, repeating gradient animations.

to avoid calling the dispose method if controller already disposed.
also added condition to cancel all animations before disposing the controller to avoid any exceptions.
to avoid it being called twice on navigation.
@ben-fornefeld
Copy link
Copy Markdown
Owner

looks sick, gonna test this and merge if everything's fine

@msamoeed
Copy link
Copy Markdown
Author

looks sick, gonna test this and merge if everything's fine

looking forward, let me know if any changes are required!

@mysticeti
Copy link
Copy Markdown

any update when this will be merged?

- Added library-level documentation
- Added AnimatedMeshGradientController constructor docs
- Fixed unresolved doc reference in AnimatedMeshGradientOptions
- Added screenshots directory with PNG and WebP demo images
- Updated pubspec.yaml to reference screenshot in package root
- All dartdoc comments now complete (100% coverage)
- Activated Pana for pub.dev scoring analysis in Makefile
- Updated screenshot path in pubspec.yaml to use WebP format
- Improved CI workflows to install webp tools for screenshot validation and ensure Pana runs during checks
@ben-fornefeld
Copy link
Copy Markdown
Owner

@msamoeed my bad, i messed up the history but cannot fix it via force-push due to access controls. i created a branch with your commits on my upstream. #32

@msamoeed
Copy link
Copy Markdown
Author

msamoeed commented Oct 6, 2025

@ben-fornefeld no worries man, let me know if anything is needed from my side.

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.

3 participants