Closed theashraf closed 2 months ago
If animation_id
is included in the config, it would be difficult to determine whether a change in animation_id
was successful. However, with the load_animation
method, we can easily verify this.
It may not be necessary to introduce animation_id
as part of the config; this can likely be abstracted by the frameworks, as demonstrated here.
The default activeAnimationId is set to either the first animation in the .lottie file or the animation ID specified in the manifest.activeAnimationId. Currently, when load_dotlottie_data is called, this default behavior cannot be overridden. This means users need to make an additional request using the load_animation method to load a different animation if needed.
To address this, we could introduce activeAnimationId to the Config. This would allow users to easily specify which animation should be loaded initially, simplifying the process.
related https://github.com/LottieFiles/dotlottie-web/issues/250