Wrapped Animation Controller
Component Detail
Description
Manages Flutter AnimationController instances and Rive runtime integrations for the summary presentation. Provides a centralised registry of named animations (count-up, badge reveal, chart draw-in, slide transitions) that UI components reference by name, ensuring animations are disposed correctly to prevent memory leaks.
wrapped-animation-controller
Summaries
The Wrapped Animation Controller powers the premium summary presentation experience users see at the close of each learning period, directly influencing retention and satisfaction metrics. By delivering smooth, engaging animations — count-up statistics, badge reveals, and chart draw-ins — this component transforms raw data into emotionally resonant moments that reinforce user achievement. A polished summary experience reduces churn risk and improves app store ratings, providing measurable competitive advantage in the peer mentoring market. Memory leak prevention ensures device performance stays optimal, protecting user trust and reducing negative reviews related to app slowdowns over time.
The Wrapped Animation Controller is a high-complexity mobile component requiring strong Flutter animation expertise and familiarity with the Rive runtime. Development should allocate two to three sprints covering Rive asset pipeline integration, named animation registry implementation, and rigorous disposal logic testing to prevent memory leaks across a range of devices. Key risks include Rive version compatibility with Flutter SDK upgrades and performance variance on low-end Android hardware. Testing must cover animation lifecycle correctness, memory profiling sessions, and regression checks after OS updates.
No external component dependencies are declared, but coordination with the design team is essential to receive finalised Rive asset files before development work can begin in earnest.
This component acts as the single source of truth for all animation state during the summary presentation screen. It maintains a named registry mapping string identifiers such as 'count-up' and 'badge-reveal' to Flutter AnimationController instances and loaded RiveFile objects, fully decoupling UI widgets from direct controller management. UI components call getController(name) or playAnimation(name) rather than instantiating controllers themselves, ensuring consistent lifecycle handling. disposeAll() must be invoked in the parent widget's dispose() override to release all controller resources.
loadRiveAnimation() is asynchronous and returns Future
Responsibilities
- Instantiate and manage AnimationController lifecycle per slide
- Load and run Rive animation files from assets
- Expose named animation triggers to UI components
- Dispose all controllers when the summary screen is closed
Interfaces
getController(name: String): AnimationController
playAnimation(name: String): void
pauseAnimation(name: String): void
resetAnimation(name: String): void
loadRiveAnimation(assetPath: String): Future<RiveFile>
disposeAll(): void
setAnimationsEnabled(enabled: bool): void
Relationships
Dependents (5)
Components that depend on this component
Related Data Entities (1)
Data entities managed by this component