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

Images are not translated correctly before the first scroll #11

Open
eric-taix opened this issue Mar 10, 2021 · 3 comments
Open

Images are not translated correctly before the first scroll #11

eric-taix opened this issue Mar 10, 2021 · 3 comments

Comments

@eric-taix
Copy link

Hey, first thanks for this library.

I'm using it for card's image inside a vertical ListView and my code seems standard:

return Stack(
      children: [
        SizedBox(
          height: height,
          width: double.infinity,
          child: image != null
              ? Parallax.inside(
                  mainAxisExtent: 150,
                  child: Image.asset(
                    image,
                    fit: BoxFit.none,
                  ),
                )
              : SizedBox(),
        ),
        Container(
          height: height,
          ....

Code of a card

When I start scrolling all visible images are "jumping" and then everything works fine. Any idea?

Here is a video which demonstrates the issue (between 2s and 3s).
https://user-images.githubusercontent.com/712517/110564365-f736e680-814c-11eb-9501-10ef32ad7c51.mp4

Thanks for your help

@fjfricke
Copy link

fjfricke commented Mar 14, 2021

Having the same issue.. It seems like the parallax effect starts from the center. I have no idea if that is true, but try to wrap your Image in a Center()-widget. This helped me at least..

@fjfricke
Copy link

never mind.. it didn't help..

@fjfricke
Copy link

This package seems to work: https://pub.dev/packages/parallax_image

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