xvrh / lottie-flutter

Render After Effects animations natively on Flutter. This package is a pure Dart implementation of a Lottie player.
https://pub.dev/packages/lottie
MIT License
1.15k stars 197 forks source link

Works fine on preview site, but broken and glitches at flutter #296

Open spencer0124 opened 12 months ago

spencer0124 commented 12 months ago

I made my own file using after effect (used bodymovin) (unlock zip file to see my json file) pass_loading.json.zip

in preview site(https://app.lottiefiles.com/preview?fileUrl=), it works what i intended but when i loaded it into flutter like this:

Lottie.asset( 'assets/lottie/pass_loading.json', repeat: true, frameRate: FrameRate.max, ),

it is broken and glitches

  1. both android simulator and ios simulator shows the same thing. I even tested on the real ios device(iphone 14 pro), and it shows the same error
  2. when i use other asset from community, it works well as it intended So i think it is the problem of my json file, but as i can see it working properly in preview site, I don't know how to fix it
  3. I've done flutter doctor, flutter clean - pub get, restart and other normal solutions. Flutter 3.10.6. Can't see any error while building in flutter run --verbose

https://github.com/xvrh/lottie-flutter/assets/62795814/6cf068a2-3e56-4c8f-ab2a-bea4f5c63e8f

https://github.com/xvrh/lottie-flutter/assets/62795814/37347318-85cb-4db4-b4f9-c17301154058

nero-angela commented 9 months ago

I haven't changed the asset, but suddenly there's a problem.

https://github.com/xvrh/lottie-flutter/assets/26322627/572dbac6-0fbb-49e4-ba61-9a2aefa75997

lhp3851 commented 9 months ago

I haven't changed the asset, but suddenly there's a problem.

2023-10-30.9.19.37.mov

  • Flutter 3.13.9
  • lottie : 2.7.0

I have the similar problem, and the situation is:

  1. put the LottieBuilder in to a list view(such as: GridView/SingleChildScrollView/CustomScrollView),
  2. and make the list view enough content to scrollable
  3. then scroll the content in the list view

https://github.com/xvrh/lottie-flutter/assets/5572476/b119367e-29a9-4f77-a8ad-3e0e018dc72b