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

RenderCache as Raster initializes animation with incorrect state #332

Open
lucas404x opened this issue Jan 12, 2024 · 1 comment
Open

RenderCache as Raster initializes animation with incorrect state #332

lucas404x opened this issue Jan 12, 2024 · 1 comment

Comments

@lucas404x
Copy link

In my app I created an AnimationController to manually handle the animation state.

 enum _FingerprintButtonLottieState {
  initial(0),
  clicked(.36),
  successBiometricTarget(.85);

  const _FingerprintButtonLottieState(this.target);
  final double target;
}
...

_buttonController = AnimationController(
   vsync: this,
   duration: const Duration(seconds: 1),
);
...

FadeScaleTransition(
                animation: _fadeInController,
                child: Lottie.asset(
                  ProdigyAssets.fingerprintButtonAnimation,
                  renderCache: RenderCache.raster,
                  controller: _buttonController,
                  height: 48,
                  onLoaded: (_) {
                    _fadeInController.forward();
                    _enableButton = backgroundUpdater.state.isUpdaterFinished;
                  },
                ),
              )

When I set RenderCache as 'Raster' the animation initial state looks like this:
image

But when I remove or replace it with the 'DrawingCommands' option, this is the animation initial state (the right one):
image

Check this link to see the animation.

@lucas404x lucas404x changed the title RenderCache as Raster initialize animation with incorrect state RenderCache as Raster initializes animation with incorrect state Jan 12, 2024
@xvrh
Copy link
Owner

xvrh commented Jan 12, 2024

I'll take a look. Thanks for the report

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants