-
-
Notifications
You must be signed in to change notification settings - Fork 493
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
Long image scroll #674
Comments
don't set BoxFit.fitWidth, and you should set initialScale to matchwidth |
how should I match the initialScale to the screen's width? I tried with MediaQuery of size.width, but it doesn't work. |
ExtendedImage.network(
imageUrl,
mode: ExtendedImageMode.gesture,
initGestureConfigHandler: (ExtendedImageState state) {
return GestureConfig(
minScale: 0.9,
maxScale: MediaQuery.of(context).size.width * 3,
initialScale: MediaQuery.of(context).size.width,
inPageView: true,
initialAlignment: InitialAlignment.center,
);
},
), I tried with this but the image is very zoomed. |
you can use this method
|
Do I have to copy all the function code and put everything on mine and test it? |
You should calculate the initial scale so that the width of the image fits perfectly, allowing you to scroll up and down |
Platforms
Android
Description
When I have a very long image I want that it takes all the width space and that it scrolls also.
My code
Try do it
I tried with
SingleChildScrollView()
and it works the way I want, but the gestures don't work. Removing theSingleChildScrollView()
it takes only a small column all to the left.The text was updated successfully, but these errors were encountered: