Open KubaStachecki opened 5 years ago
My best guess is that parsing is just too slow. I'd like to experiment with another approach to Lottie before making any changes here, but I don't have a timeframe right now. I'd be happy to review PRs that address this though.
Thanks for quick reply. I'm trying to figure it out (while shooting in the blind really since it's super random), but maybe, just maybe it got better after few tries. I have to test it longer to be sure. What I did (that may or may not have a connection to the case):
I changed the order of InitState so that controller and listener are set before asset loading. previously it was the other way around based on the example app:
@override
void initState() {
super.initState();
_controller = new AnimationController(
duration: Duration(milliseconds: duration),
vsync: this,
);
_controller.addListener(() => setState(() {}));
loadAsset(assetpath).then((LottieComposition composition) {
setState(() {
_composition = composition;
_controller.repeat();
});
});
}
I have a problem with disappearing elements - usually on the first loop on animation, and slower / older devices (but emulator also have this problem, and its just random - all devices, not just while on higher cpu use, not every time the same shape etc.) This is not dropped frames problem because some shapes stay and some disappear. Lottie files work on web, android and IOS preview seamlessly.
Example: https://lottiefiles.com/share/g7EvcC
Here is video presenting issue: https://drive.google.com/open?id=1pCLnmaAGezDF2F_NBoFZFQUBZGRWtL_A
Here is my flutter doctor:
Doctor summary (to see all details, run flutter doctor -v): [√] Flutter (Channel beta, v1.2.1, on Microsoft Windows [Version 10.0.17134.590], locale pl-PL) [√] Android toolchain - develop for Android devices (Android SDK version 28.0.3) [√] Android Studio (version 3.3) [√] Connected device (1 available)
• No issues found!