Skip to content
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

Feature #290

Open
thomtomdup opened this issue Jul 17, 2023 · 1 comment
Open

Feature #290

thomtomdup opened this issue Jul 17, 2023 · 1 comment
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@thomtomdup
Copy link

thomtomdup commented Jul 17, 2023

Hello.
Does it or may be could it be possible to set Lottie animation with a json String value coming from programming and not from json file ?
Thank you. :)

@xvrh xvrh added enhancement New feature or request help wanted Extra attention is needed labels Jul 28, 2023
@xvrh
Copy link
Owner

xvrh commented Aug 6, 2023

Currently this is not really supported and you have to workaround by re-encodind your string into a list of byte:

  var rawJsonString = '{"v":"5.1.16","fr":60...}';
  var bytes = utf8.encode(rawJsonString);
  LottieComposition.fromBytes(Uint8List.fromList(bytes));

Long term I would like to support this better.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants