Duplicate Check
Describe the bug
The example for locally hosted Lottie files produces this error Error loading Lottie: Unable to load asset:, the web-hosted one works fine.
It's not a malformed Lottie JSON, as I've tried with verified working Lottie files and get the same error.
Code sample
Code
import flet as ft
import flet_lottie as ftl
def main(page: ft.Page):
page.add(
ft.SafeArea(
content=ft.Column(
controls=[
ftl.Lottie(
src="https://raw.githubusercontent.com/xvrh/lottie-flutter/master/example/assets/Mobilo/A.json",
reverse=False,
animate=True,
error_content=ft.Placeholder(ft.Text("Error loading Lottie")),
on_error=lambda e: print(f"Error loading Lottie: {e.data}"),
),
ftl.Lottie(
src="sample.json",
reverse=False,
animate=True,
enable_merge_paths=True,
enable_layers_opacity=True,
error_content=ft.Placeholder(ft.Text("Error loading Lottie")),
on_error=lambda e: print(f"Error loading Lottie: {e.data}"),
),
],
),
)
)
if __name__ == "__main__":
ft.run(main)
To reproduce
- Copy the example python code from GitHub.
- Copy the sample.json from GitHub.
- flet run
Expected behavior
No response
Screenshots / Videos
Captures
[Upload media here]
Operating System
Windows
Operating system details
10
Flet version
0.82.2
Regression
I'm not sure / I don't know
Suggestions
No response
Logs
Logs
Additional details
No response
Duplicate Check
Describe the bug
The example for locally hosted Lottie files produces this error
Error loading Lottie: Unable to load asset:, the web-hosted one works fine.It's not a malformed Lottie JSON, as I've tried with verified working Lottie files and get the same error.
Code sample
Code
To reproduce
Expected behavior
No response
Screenshots / Videos
Captures
[Upload media here]
Operating System
Windows
Operating system details
10
Flet version
0.82.2
Regression
I'm not sure / I don't know
Suggestions
No response
Logs
Logs
[Paste your logs here]Additional details
No response