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

[Feature request] Full-screen Image Viewer #617

Closed
Skquark opened this issue Nov 22, 2022 · 2 comments
Closed

[Feature request] Full-screen Image Viewer #617

Skquark opened this issue Nov 22, 2022 · 2 comments

Comments

@Skquark
Copy link

Skquark commented Nov 22, 2022

What we could use is a good simple Image Viewer, which includes full screen pan & zoom. The best one I found for the job I think is https://pub.dev/packages/easy_image_viewer which even lets you open multiple images and page through them, and a bunch of other practical options as well.. I've used a different image viewer in Flutter before, but this one seems like it's easy and would satisfy many people's needs.

@Skquark
Copy link
Author

Skquark commented Jan 28, 2023

I went ahead an coded the ImageViewer feature up, felt bad relying on you guys for a feature that I wanted in my app. Took a couple days to figure out the best integration, but it's a fairly simple launcher for easy_image_viewer that I hope there's not problem with the way I did it. It wasn't a widget control, it's more of an invoke_method, so I copied page.launch_url() for the way to do it. Here's the page method:

  def open_image_viewer(
        self,
        image: Union[str, List[str]],
        swipe_dismissible: Optional[bool] = True,
        double_tap_zoomable: Optional[bool] = True,
        background_color: Optional[str] = None,
        close_button_color: Optional[str] = None,
        close_button_tooltip: Optional[str] = "Close",
        immersive: Optional[bool] = True,
        initial_index: Optional[int] = 0,
    )

So to run it, it's as easy as page.open_image_viewer(image_url_list) to open the full screen image pager, or for single image url. Should work correctly, but I haven't tested it personally yet since it's a whole process to compile and test. Feel free to make any changes, I can help with documentation if you want, it's a self-explanatory function. I'm looking forward to use this all over my Stable Diffusion image generation app once the pr #943 gets pushed. Thanks.

@Skquark
Copy link
Author

Skquark commented Dec 19, 2023

Still wanting to have this feature so I created another Pull Request at #2248 with the updated commits. Hope it can be reopened, reviewed, fixed if needed, and merged with main. Let me know if there's anything else I can assist with to speed up the process, like helping with the docs. Thanks.

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