-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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
[iOS] Async animations support #2117
[iOS] Async animations support #2117
Conversation
LottieView { | ||
await LottieAnimation.loadedFrom(url: url) | ||
} placeholder: { | ||
LoadingIndicator() | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Example call site for animation from URL
LottieView { | ||
try await DotLottieFile.named(animationName) | ||
} placeholder: { | ||
LoadingIndicator() | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Example callsite for loading a Dot lottie file
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is great, thank you @miguel-jimenez-0529!
I pulled your branch and experimented a bit to help myself understand the requirements. I did a bit of cleanup in LottieView
itself and pushed a commit with those changes. lmk what you think.
.getRealtimeAnimationProgress(animationPlaying ? $sliderValue : nil) | ||
|
||
LottieView { | ||
try await lottieSource() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
really nice :)
Head branch was pushed to by a user without write access
This PR adds support for loading async animations from sources such as:
The PR also