thesmythgroup / easy_image_viewer

An easy Flutter image viewer with pinch & zoom support.
MIT License
41 stars 51 forks source link

[Feature Request] provider barrierDismissible #30

Closed nizwar closed 1 year ago

nizwar commented 2 years ago

It will be nice if you provide params for barrierDismissible

jfahrenkrug commented 2 years ago

@nizwar Thank you for your feedback. Could you explain your specific use case, so I can better understand the problem? Thanks!

PS: That's why we have a template for opening issues: The template asks a bunch of questions so we can best understand the intention :)

nizwar commented 2 years ago

Make user able to close the dialog or screen once they click on barrier, or background... as i can see you're using showDialog to show it, you'll find barrierDismissable parameter

jfahrenkrug commented 2 years ago

@nizwar Correct me if I'm wrong, but would this even make a difference since we are taking up the whole screen to show the dialog? Is there even a barrier that could be tapped to dismiss it? Would you be able to put together a PR with a demo?

nizwar commented 2 years ago

Well, since you have backroundColor and i can set it to Colors.black.withOpacity, it will look like dialog, but in my case, there is no way to close it by tap... in other hand your plugin only accept ImageProvider and there is no way i can wrap the image with GestureDetector

i'll make PR once i'm free

jfahrenkrug commented 1 year ago

I took another look at this. Since we are always using the whole screen, barrierDismissable wouldn't make a difference. Actually, its default value is "true". At this point I'd say that users who prefer a non-fullscreen presentation should use EasyImageViewPager directly with their own call to showDialog. If more users have this specific need, I'd be happy to take another look. For now, I'm closing this.