one_context icon indicating copy to clipboard operation
one_context copied to clipboard

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

Open khoitqa opened this issue 2 years ago • 9 comments

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

khoitqa avatar Jul 13 '22 09:07 khoitqa

Hi @anhkhoi159 can you provide some minimal reproducible code?

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

https://user-images.githubusercontent.com/3827308/178866950-c569d57f-7ece-41f5-a9dc-f925487e719a.mov

emanuel-braz avatar Jul 14 '22 01:07 emanuel-braz

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

khoitqa avatar Jul 14 '22 04:07 khoitqa

@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();

emanuel-braz avatar Jul 18 '22 03:07 emanuel-braz

@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?.

khoitqa avatar Jul 18 '22 04:07 khoitqa

@anhkhoi159 have you ever tried without WillPopScope?

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

emanuel-braz avatar Jul 18 '22 04:07 emanuel-braz

@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

khoitqa avatar Jul 18 '22 04:07 khoitqa

@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

emanuel-braz avatar Jul 18 '22 14:07 emanuel-braz

https://user-images.githubusercontent.com/55753138/179649635-a7fecf26-e64a-4ae6-ba6c-e39bbd835dda.mov

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

khoitqa avatar Jul 19 '22 02:07 khoitqa

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

emanuel-braz avatar Jul 30 '22 16:07 emanuel-braz