Skip to content

feat: Add runtime animation replacement - #11

Merged
blaugold merged 20 commits into
mainfrom
feature/allow-animation-swap
Apr 8, 2026
Merged

feat: Add runtime animation replacement#11
blaugold merged 20 commits into
mainfrom
feature/allow-animation-swap

Conversation

@antonstefer

@antonstefer antonstefer commented Feb 4, 2026

Copy link
Copy Markdown
Contributor

Summary

  • add runtime animation replacement methods so animations can be swapped without recreating the platform view
  • upgrade the native Lottie and Android/iOS build toolchains used by the plugin and example app
  • harden native dynamic value updates so malformed color or opacity inputs return platform errors instead of crashing

Changes

  • Dart API: add setAnimationFromUrl(), setAnimationFromAsset(), and setAnimationFromJson() to LottieController
  • Dart cleanup: replace deprecated Color.value with toARGB32() and make StandardMessageCodec const in LottieView
  • Android native: add runtime animation swap handlers, enable async updates, move the failure listener into init, and validate setValue arguments and payload parsing
  • iOS native: add runtime animation swap handlers and validate setValue arguments and payload parsing, including locale-safe opacity parsing
  • Example app: add buttons to swap animations at runtime, log animation state changes, and update the iOS example app setup for the current Flutter embedding
  • Build updates: upgrade Kotlin to 2.1.0, AGP to 8.7.0, Java to 17, appcompat to 1.7.1, lottie-android to 6.7.1, and lottie-ios to 4.6.0; migrate the example Android Gradle setup to the modern Flutter plugin configuration
  • Docs: refresh CHANGELOG.md and repository guidance in CLAUDE.md

@antonstefer
antonstefer marked this pull request as draft February 4, 2026 17:04
@antonstefer
antonstefer marked this pull request as ready for review February 6, 2026 15:10
@blaugold
blaugold self-requested a review April 8, 2026 06:11
@blaugold
blaugold merged commit b46a386 into main Apr 8, 2026
1 check passed
@blaugold
blaugold deleted the feature/allow-animation-swap branch April 8, 2026 06:19
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.

2 participants