flet-rive#
A cross-platform Flet extension for displaying Rive animations.
It is based on the rive Flutter package.
Platform Support#
This package supports the following platforms:
Platform | Supported |
---|---|
Windows | ✅ |
macOS | ✅ |
Linux | ✅ |
iOS | ✅ |
Android | ✅ |
Web | ✅ |
Usage#
Installation#
To install the flet-rive
package and add it to your project dependencies:
Example#
main.py
import flet as ft
import flet_rive as ftr
def main(page: ft.Page):
page.add(
ftr.Rive(
src="https://cdn.rive.app/animations/vehicles.riv",
placeholder=ft.ProgressBar(),
width=300,
height=200,
),
ftr.Rive(
src="vehicles.riv",
placeholder=ft.ProgressBar(),
width=300,
height=200,
),
)
ft.run(main, assets_dir="assets")