Comments (6)
Hello, If I use Navigator.pop(context);
it will get me back from that screen, but if I want to stay on same page?
from flutter_cool_alert.
from flutter_cool_alert.
No it won't close the page. If you have the dialog open and you trigger a Navigator.pop, the dialog closes and not the page.
from flutter_cool_alert.
Hi, if you want to close the dialog you'd have to handle that yourself. All you need to do is call Navigator.pop(context);
…
On Fri, 11 Dec 2020, 5:21 am Irfan Akram, @.***> wrote: Dialog doesn't close when we use to tap "onConfirmBtnTap". CoolAlert.show( context: context, type: CoolAlertType.success, text: responseData['msg'], onConfirmBtnTap: ( ){ ... } } And How to hide the "loading" dialog automatically? CoolAlert.show( context: context, type: CoolAlertType.loading, ); — You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub <#6>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AGAMVZUJND3U67SJZRB2IODSUGT5FANCNFSM4UWCIR5A .
@webmasterscity i dunno why you would give a thumbs down to my answer but it's common knowledge that to close a dialog, all you have to do is pop it.
You can refer to this article @irfan0429 @webmasterscity
https://stackoverflow.com/questions/50683524/how-to-dismiss-flutter-dialog
from flutter_cool_alert.
Hi, if you want to close the dialog you'd have to handle that yourself. All you need to do is call Navigator.pop(context);
…
On Fri, 11 Dec 2020, 5:21 am Irfan Akram, @.***> wrote: Dialog doesn't close when we use to tap "onConfirmBtnTap". CoolAlert.show( context: context, type: CoolAlertType.success, text: responseData['msg'], onConfirmBtnTap: ( ){ ... } } And How to hide the "loading" dialog automatically? CoolAlert.show( context: context, type: CoolAlertType.loading, ); — You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub <#6>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AGAMVZUJND3U67SJZRB2IODSUGT5FANCNFSM4UWCIR5A .@webmasterscity i dunno why you would give a thumbs down to my answer but it's common knowledge that to close a dialog, all you have to do is pop it.
You can refer to this article @irfan0429 @webmasterscity
https://stackoverflow.com/questions/50683524/how-to-dismiss-flutter-dialog
yes but i am using cool_alert: ^1.1.0
and I am trying in onConfirmBtnTap as when you click on btn than it goes to another page but in cool_alert it will redirect to new page but not close the dialog and when i use Navigator.pop(context);
on before redirect but same not close and when i use it after redirect and it redirect and came in same page
from flutter_cool_alert.
Instead of Navigator.pop(context);
, try this Navigator.of(context, rootNavigator: true).pop();
This solves custom back button press issue
from flutter_cool_alert.
Related Issues (20)
- Remove the animation at top HOT 1
- Not close dialog when clicking on ok button HOT 3
- Need more customble options HOT 1
- Small bug with dismissing alert HOT 1
- double tap in "ok" button close page HOT 1
- CoolAlertType is expecting ? but not available thats why dart giving me this below error
- Lottie animation keeps looping HOT 1
- Can move confirm button to left side? HOT 1
- How to use API to close HOT 1
- overflow problem HOT 1
- I don't know if this is a problem or not, it's just not pleasing to the eye when running flutter HOT 5
- Custom Widgets Not being Displayed on 2.0.1 HOT 7
- Cancel Button Always Popping Context
- autoCloseDuration
- how can I change the color of cancel button?
- cool alert two
- Android :- On phone back press, there is no callback option available.
- add optional decorations for button
- Navigator.pushReplacement() not working on confirm button tap HOT 3
- AutoCloseDuration causing multiple renders of popup.
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from flutter_cool_alert.