⌂
›
Extensions
›
Lottie
Lottie extension
Render and control Lottie animations from assets, URLs, or embedded sources.
Enable the extension
Add the extension key to ruflet.yaml:
extensions:
- lottie
Run ruflet run during development or ruflet build <target> for a release. Extension packages are compiled into the Ruflet client, so rebuild the client after changing this list.
Ruby DSL example
animation = lottie(
src: "assets/success.json",
repeat: false,
on_load: ->(_event) { puts "Animation loaded" },
on_error: ->(event) { warn event.data }
)
page.add(animation)
API provided
- Extension key:
lottie - Flet package:
flet_lottie - Kind: Animation control
- Lottie control reference — complete helpers, properties, events, and methods.
Permissions and platforms
No protected service declaration is added automatically. Platform support still follows the underlying Flet extension, so test every target you ship.
Build behavior
Ruflet resolves the extension key to flet_lottie and includes that Flet package through the client extension pipeline. Application code uses the Ruby DSL shown above; do not add the package directly to your app's Flutter dependencies.