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

OneContext().popAllDialogs() or OneContext().popDialogs() don't work. This function pop my screen instead of my dialog #24

Open
khoitqa opened this issue Jul 13, 2022 · 9 comments

Comments

@khoitqa
Copy link

khoitqa commented Jul 13, 2022

When I use OneContext().showDialog(builder: (_)=>loadingDialog) to show dialog which lying on top of another Dialog, OneContext().popAllDialogs() or OneContext().popDialogs() don't work. This function pop my screen instead of my loading dialog

@emanuel-braz
Copy link
Owner

Hi @anhkhoi159 can you provide some minimal reproducible code?

Instead OneContext().popDialogs(), use OneContext().popDialog()

dialogs.mov

@khoitqa
Copy link
Author

khoitqa commented Jul 14, 2022

I tried to use it, but it did not work. Can you help me check my issue?
image

@emanuel-braz
Copy link
Owner

emanuel-braz commented Jul 18, 2022

@anhkhoi159 I gonna check this out, but if you want to lock the screen while something is loading, it might make more sense to use overlays

// Show a custom progress indicator
OneContext().showProgressIndicator(
    builder: (_) => MyAwesomeProgressIndicator(); // You can use your custom progress indicator here!
);

// Later
OneContext().hideProgressIndicator();

@khoitqa
Copy link
Author

khoitqa commented Jul 18, 2022

@anhkhoi159 I gonna check this out, but if you want to lock the screen while something is loading, it might make more sense to use overlays

// Show a custom progress indicator
OneContext().showProgressIndicator(
    builder: (_) => MyAwesomeProgressIndicator();
);

// Later
OneContext().hideProgressIndicator();

@emanuel-braz if I use overlays, I cannot show loading when any dialog is showing. can you help me check my case?.

@emanuel-braz
Copy link
Owner

emanuel-braz commented Jul 18, 2022

@anhkhoi159 have you ever tried without WillPopScope?

you can use the barrierDismissible: false to avoid close dialogs when outside touch

@khoitqa
Copy link
Author

khoitqa commented Jul 18, 2022

@anhkhoi159 have you ever tried without WillPopScope?

you can use the barrierDismissible: false to avoid close dialogs when outside touch

@emanuel-braz
without WillPopScope has the same result. When I use show showProgressIndicator, the loading is behind my dialog ? can u help me check

@emanuel-braz
Copy link
Owner

@anhkhoi159 have you ever tried without WillPopScope?
you can use the barrierDismissible: false to avoid close dialogs when outside touch

@emanuel-braz without WillPopScope has the same result. When I use show showProgressIndicator, the loading is behind my dialog ? can u help me check

I don't understand, the overlay is not behind dialogs, can you provide a video?
Screen Shot 2022-07-18 at 11 47 28

@khoitqa
Copy link
Author

khoitqa commented Jul 19, 2022

Screen.Recording.2022-07-19.at.09.14.15.mov

@emanuel-braz can you help me check, my overlay is behind my dialog.

@emanuel-braz
Copy link
Owner

Hello I tried to reproduce this behavior, without success :(
Can you provide a reproducible code?

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