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

Dialog popping issue #205

Open
bislerium opened this issue Jul 12, 2022 · 8 comments
Open

Dialog popping issue #205

bislerium opened this issue Jul 12, 2022 · 8 comments
Labels
bug Something isn't working

Comments

@bislerium
Copy link

Version

2.5.0

Library

feedback

Flutter channel

stable

Flutter version

3.0.3

Platform

Android

Details

I was trying to pop a dialog and it didn't pop, rather the backward scaffold popped.

I have two widget file for: setting page and logout FAB (main.dart).
When the setting page is fully loaded, The function to logout is provided through a provider as callback/handler to the logout button > alert dialog > ok button.
Without the use of Feedback, I am able to pop just to dialog.
With the Feedback, The scaffold behind the dialog is pop

ping and the dialog remains intact.
Direct implementation of Navigator.pop() in the dialog > ok button function works but using the callback from provider getter method, it's not working as expected.

Screen_Recording_20220712-222336.mp4

Steps to reproduce

  • Create a provider with getter, setter for a callback function.
  • use setter from scaffold A to store callback function that includes navigator.pop() (Alert dialog pop expectation).
  • use getter from scaffold B to assign the callback function to a OK button inside dialog actions.
  • Run and click OK button.

Output of flutter doctor -v

[√] Flutter (Channel stable, 3.0.3, on Microsoft Windows [Version 10.0.22000.778], locale en-US)
[√] Android toolchain - develop for Android devices (Android SDK version 33.0.0)
[√] Chrome - develop for the web
[X] Visual Studio - develop for Windows
    X Visual Studio not installed; this is necessary for Windows development.
      Download at https://visualstudio.microsoft.com/downloads/.
      Please install the "Desktop development with C++" workload, including all of its default components      
[√] Android Studio (version 2021.2)
[√] VS Code (version 1.69.0)
[√] Connected device (4 available)
[√] HTTP Host Availability
@bislerium bislerium added the bug Something isn't working label Jul 12, 2022
@gysipos
Copy link

gysipos commented Oct 20, 2022

+1
We faced the exact same issue. Open dialog on back button press stays open and the underlying scaffold gets popped. feedback: ^2.5.0

@ueman
Copy link
Owner

ueman commented Oct 20, 2022

Hey, are you open to fixing it and contributing it via PR?

@gysipos
Copy link

gysipos commented Oct 20, 2022 via email

@PLGuerraDesigns
Copy link

I also faced issues with this package popping the page behind the dialog instead of the dialog itself. It seems to cause some interference with go_router. However, setting useRootNavigator in showDialog to false seemed to fix the issue.

@IsaiasCuvula
Copy link

I'm facing the same issue, as soon I added the package at the top level it messed up with my entire navigation system.

GoRouter - exception-no-go router-found-in-context
showModalBottomSheet() only works if useRootNavigator: false,
alerts dialogs not working properly.

I tried to manipulate but it just messed up, the package is amazing, for now, consider removing the package until it gets a little bit more stable.

@ueman ueman changed the title Dialog poping issue Dialog popping issue Mar 5, 2024
@JesusHdez960717
Copy link
Contributor

Similar to #194

@JesusHdez960717
Copy link
Contributor

hi @gysipos, @IsaiasCuvula, @PLGuerraDesigns, and mainly @bislerium the initial creator of the issue the PR that solves this bug is finally merged (#293), if you want test it again with the latest version (3.1.0) to make sure and in case the bug is not reproduced any more, feel free to close this issue

@gysipos
Copy link

gysipos commented Apr 19, 2024

Cool, thanks for the headsup!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

6 participants