lottie-flutter icon indicating copy to clipboard operation
lottie-flutter copied to clipboard

Feature

Open thomtomdup opened this issue 1 year ago • 1 comments

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. :)

thomtomdup avatar Jul 17 '23 13:07 thomtomdup

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.

xvrh avatar Aug 06 '23 18:08 xvrh