DotLottieAnimation config
DotLottieAnimation
instances can be initialized with the following settings:
Property | Type | Description |
---|---|---|
animationData | String | Data of a Lottie animation as a String. |
fileName | String | Name of the animation inside the main asset bundle. |
webURL | String | A web URL pointing to a .json or .lottie animation file. |
You can then pass a AnimationConfig
to define the playback settings of your animation containing the following settings:
Property | Type | Description |
---|---|---|
loop | Bool | Loop the animation. |
autoplay | Bool | Autoplay the animation on load. |
speed | Float | Playback speed of the animation. |
mode | Mode | Playback mode of the animation. Can be either: forward , reverse , bounce , bounceReverse . |
width | Int | Override the width of the animation. By default this is read from inside the Lottie, otherwise defaults to 512. |
height | Int | Override the height of the animation. By default this is read from inside the Lottie, otherwise defaults to 512. |
segment | (Float, Float) | Play the animation between an interval of frames. |
backgroundColor | CIImage | Background color of the animation. |
useFrameInterpolation | Bool | Use frame interpolation, defaults to true. Having this can impact performance. Useful to maintain the quality of the animation at slow playback speeds. |
marker | String | The lottie named marker to play. |
layout | Layout | The animation layout configuration. |