thesmythgroup / easy_image_viewer

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

Expose: useRootNavigator #31

Closed Ahmadre closed 1 year ago

Ahmadre commented 1 year ago

Describe the Feature

It would be great if we can configure useRootNavigator, because some people don't want to show the Dialog in front of all other pages (like sub-pages e.g.)

Todo

Suggested Solution

expose:

Bildschirmfoto 2022-11-10 um 15 52 27
jfahrenkrug commented 1 year ago

Thanks for this. You can try out this branch: https://github.com/thesmythgroup/easy_image_viewer/tree/GH-31_expose_root_navigator

However, I'm a bit concerned about this change. Here's why: The whole package is designed for two things:

  1. Easily (hence the name) show images in a a fullscreen, immersive mode. That includes a close button etc.
  2. Using the EasyImageViewPager directly (as you can see in main.dart) if you want to build a custom view.

Could you describe in which specific scenario you'd like to use the "easy" showDialog version without useRootNavigator = true? Any scenario I can think of (on a tab, for example) would be weird, because you'd still have the close button etc.

jfahrenkrug commented 1 year ago

@Ahmadre I'm closing this issue for now. Feel free to open a new one with more information if needed. Thanks!

dvoloshyn commented 3 months ago

Hi @jfahrenkrug, the scenario is using de facto standard flutter navigation package go_router with de facto standard stateful shell navigation supported by that package. I believe this scenario is very common nowadays and should be supported in an 'easy' way. What do you thing?