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

add TGS (telegram animated sticker) support

Open agusibrahim opened this issue 1 year ago • 1 comments

hi, i added some stuff to support load gzip json data where is used in telegram animated sticker file (tgs). simply just load normally tgs file from asset or network

agusibrahim avatar Oct 21 '23 15:10 agusibrahim

@agusibrahim the next version (currently v3.0.0-alpha.1) will support loading .tgs file like this:

Lottie.asset(
  'sticker.tgs',
  decoder: LottieComposition.decodeGZip,
)

This is a bit different from your PR because:

  • It uses the GZip decoder from package:archive. That way, it works on the web
  • The decoder parameter trick allows for the GZip decoder to be tree-shaked if not used.

Let me know if it works for you.

xvrh avatar Nov 15 '23 12:11 xvrh