Skip to content

Add download progress animations in SharedDecksDownloadScreen#9

Open
ColbyCabrera wants to merge 2 commits into
criticalAY:sharedeck-composefrom
ColbyCabrera:sharedeck-compose
Open

Add download progress animations in SharedDecksDownloadScreen#9
ColbyCabrera wants to merge 2 commits into
criticalAY:sharedeck-composefrom
ColbyCabrera:sharedeck-compose

Conversation

@ColbyCabrera
Copy link
Copy Markdown

This pull request enhances the user experience of the shared deck download screen by introducing smooth animations for both the circular progress indicator and the percentage text. These changes make the download progress visually more appealing and responsive.

Animation Improvements:

  • Added animated transitions to the circular progress indicator using animateFloatAsState with a spring animation for smoother progress updates.
  • Introduced animated transitions to the percentage text using AnimatedContent, combining fade and scale effects for a subtle percentage update.

The download percentage text tends to update every 2-3 seconds or so already, so the text animation isn't overbearing, though this is a matter of opinion/taste

26-05-27-14-19-44.1.mp4

- Implemented `animateFloatAsState` to smooth out transitions in the download progress indicator.
- Configured the animation using a `SpringSpec` with low stiffness and a low bouncy damping ratio.
- Updated `CircularProgressIndicator` to use the animated progress value instead of the raw percentage.
- Wrapped the download percentage text in `AnimatedContent` to animate transitions between value changes.
- Defined a custom `transitionSpec` using a combination of fade and scale animations with specific `tween` durations.
- Configured the animation to use a subtle scale effect (0.92x) for a smoother visual "pop" during updates.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant