Questions tagged [flutter-dialog]
68 questions
10
votes
7 answers
Flutter : Dialog not working from PopupMenuItem tap
showMenu(
context: context,
position: RelativeRect.fromLTRB(5000, appBar.preferredSize.height + statusBarHeight!, 0.0, 0.0),
items: [
PopupMenuItem(
child: Text('Cancel'),
value: 0,
onTap:…

HasanToufiqAhamed
- 751
- 1
- 5
- 17
7
votes
1 answer
How to show confirm dialog before leave screen in Flutter
I want to show alert dialog before dispose or leave the screen or at the latest show warning SnackBar, How can I do that?
I know how to show dialog and SnackBar but I don't know where I do that or when I tried to do it in dispose of life hook but it…

Mahmoud Niypoo
- 1,598
- 5
- 24
- 41
6
votes
1 answer
How to use BlocBuilder to refresh a Dialog in Flutter
I have a dialog and I wrap it in a blocbuilder to update it according to the type of state but the dialog just is built First time and after state has changed it doesn't rebuild.
showDialog(
context: context,
builder: (_) {
…

Parisa Baastani
- 1,713
- 14
- 31
5
votes
1 answer
How Do I Show a Dialog in Flutter Using a go_router Route?
I am currently using showGeneralDialog to present a dialog popup like this:
This is all fine and good, but it happens at the root Navigator level, and I would rather have all my views as a Go Router route so that I can control their presentation in…

Clifton Labrum
- 13,053
- 9
- 65
- 128
5
votes
2 answers
How to show dialog box without context in flutter
I was trying to use the firebase cloud assessing and in the process, I want to just show a popup dialogue to the user on the arrival of the push notification. But to show the dialogue we need thee context object as one of the arguments of showDialog…

Deepak Kumar
- 1,246
- 14
- 38
3
votes
2 answers
Flutter - How to check if dialog is shown when using go_router
I was using Navigator 1 then I migrated to go_router to support deep links and web.
Sometimes when I send HTTP requests, I show a loading dialog using showDialog() until the response is processed, after processing I need to check if a dialog is…

Khalid Muhammad
- 31
- 5
2
votes
1 answer
error message nt going even if my textfield is not empty
Before I reach to my alert demo.. I am stuck in the beginning..
In my alert dialog there is a textField in content,
I have set an error text if textfield is empty but even after typing this error text not disappearing..it remains there....what is my…

Irfan Ganatra
- 967
- 3
- 13
2
votes
3 answers
Text widget doesn't appear in dialog after user Future.delayed in Flutter
I have a dialog that appears after user click on send button . When dialog appears , I want to show a text after 5 seconds . I use Future.delayed but the text doesn't appear at all . It appears only when I close the dialog and open it again . I want…

Ahmed Elsayed
- 231
- 3
- 23
2
votes
1 answer
Showing dialog from inside another dialog
How do you show a dialog from an already open dialog? Basically, nesting dialogs in Flutter.
When I try to use showDialog(); in Flutter from inside an already created dialog(for example, by clicking some link inside a dialog, another dialog should…

João Martins
- 706
- 1
- 8
- 20
2
votes
2 answers
Is there a way to detect if there is any open drawer?
I have a Flutter app that displays an animation. I want the animation to pause if there is an open Drawer or a modal dialog (like showModalBottomSheet) displayed anywhere in the App.
I could handle the events of a specific Drawer directly and manage…

Fox32
- 13,126
- 9
- 50
- 71
2
votes
1 answer
Flutter show full screen dialog
I have the following function to show a dialog, I used media query to set it to 100%, but when it runs, I still see white margin around the dialog.
How can I archive full-screen dialog?
Future showLoadingDialog(BuildContext context,…

user1187968
- 7,154
- 16
- 81
- 152
2
votes
2 answers
closing all dialogs & popups 'only' before disposing current widgetn no other widgets should be removed
I have been working on a project which requires me to change the on-screen widget based on the mobile device's orientation.
For example, in the case of portrait orientation, I need to show a widget (let's say portrait widget) and in case of…

Harshvardhan Joshi
- 2,855
- 2
- 18
- 31
1
vote
0 answers
How to prevent tap on AlertDialog area from passing behind?
I am using a WebView to show an embedded youtube video.
After that I show an AlertDialog that appears over that WebView and if I tap on the AlertDialog area, the behind video will handle the tap events, such as playing, pausing, etc.
How can I…

Miguel Gamboa
- 8,855
- 7
- 47
- 94
1
vote
2 answers
How to close severals showDialogs in flutter
How can I to close all the showDialogs in my aplication? in this case _mostrarDialogConfirmacion is the dialog where i request to the user a confirmation to make a query, cargandoDialog is another dialog where i show a loading message while the…

Agustin Coronel
- 297
- 4
- 12
1
vote
1 answer
How can we create a container with a text as a child of showDialog and appear the text in a proper way
I used to make a text ('Loading') to be centered in the show dialog but what happened is the text is appearing in a bad way as when we make a screen without scaffold, it is appearing here the same, I used to put scaffold above the center widget but…

Flutter Dev
- 488
- 3
- 18