Skip to content

Feature Request: Lottie files #47

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
vintage opened this issue Oct 19, 2020 · 3 comments
Closed

Feature Request: Lottie files #47

vintage opened this issue Oct 19, 2020 · 3 comments
Labels
contributions welcome Welcome contribute

Comments

@vintage
Copy link

vintage commented Oct 19, 2020

Hey there!

Would be great to have integration for the lottie files (through https://pub.dev/packages/lottie). Right now in the project I'm working on we're using the syntax:

Lottie.asset(Assets.animations.animationName)

but would be lovely to achieve it just like for the SVG files through the generated code:

Assets.animations.animationName.lottie()

The trickiest part would be probably to distinguish lottie files from non-lottie files, as it uses .json as the file extension?

@wasabeef wasabeef added the contributions welcome Welcome contribute label Nov 14, 2020
@jamesblasco
Copy link

jamesblasco commented Nov 11, 2021

@wasabeef would you be interested in a PR for this?. I am using flutter_gen in a project and I would like to generate lottie assets with it.

I think the implementation is almost straight forward, the only thing is the file extension .json is very vague. I was thinking to only support files with the name *_lottie.json. What do you think about it?

@ghost
Copy link

ghost commented Jun 10, 2022

@wasabeef would you be interested in a PR for this?. I am using flutter_gen in a project and I would like to generate lottie assets with it.

I think the implementation is almost straight forward, the only thing is the file extension .json is very vague. I was thinking to only support files with the name *_lottie.json. What do you think about it?

I think it's a good idea.
Please implement it.

@bramp
Copy link
Contributor

bramp commented Oct 14, 2023

This issue has been fixed ~a year ago.

As for #47 (comment) the implementation finds all .json files that contain a json object with specific keys and a version of > 4.4.0. This can still lead to false positives, but seems rare.

@AlexV525 AlexV525 closed this as completed Mar 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
contributions welcome Welcome contribute
Projects
None yet
Development

No branches or pull requests

5 participants