Questions tagged [flutter-alertdialog]

For questions relating to Flutter's AlertDialog class. Use this tag in combination with the general [flutter] tag. If your question applies to Flutter more generally, use the [flutter] tag only.

Reference:

157 questions
1
vote
1 answer

Want to Show an AlertDialog when clicking on a Button, on Pressed Method shows an error. ( Undefined name 'context' .)

Hey im New in learning Flutter and Dart. Please help me. :) I really don´t know what to do I`m a totaly beginner. :/ Now I have pastet my complete code I hope you can see where I defined my Container. This all is a TabView because I want to train an…
JoMo
  • 11
  • 2
1
vote
1 answer

Get a Checkbox in an AlertDialog

I added an AlertDialog, in which a Checkbox is, but if I tap on the Checkbox, it doesn´t get a hook. I also added another Checkbox below the AlertDialog and this one gets a hook by clicking on it. I think it has something with setState() to do, but…
simi
  • 323
  • 4
  • 12
1
vote
1 answer

Unhandled Exception: type 'Future' is not a subtype of type 'Future'

I am trying to make a reusable AlertDialog in Dart and was able to make one. The UI displays and it works well. The only problem in this code is that when I press the Save Button, it gives the following error: Unhandled Exception: type 'Future' is…
CoderUni
  • 5,474
  • 7
  • 26
  • 58
1
vote
1 answer

Flutter GoogleMap load alertdialog randomly failed on load on Huawei P10+

This error happen only when tested flutter app on my huawei p10+. My app load googlemap on an alertdialog. Map can load a few times and then it fail randomly. But i noticed Googlemap unable to load in the alertdialog container when it fail. This is…
Hanis
  • 309
  • 1
  • 6
  • 15
1
vote
1 answer

Flutter: Listview in AlterDialog not scrollable

I need an AlertDialog with minHeight of 50. It contains a ListView. If the ListView exceeds the screen it should become scrollable. But I can't scroll for some reason. Can anyone explain to me why it's not working :) AlertDialog( shape:…
Frederik
  • 1,221
  • 2
  • 13
  • 22
1
vote
3 answers

How to add dividers in flutter with yes no buttons?

I have to add a horizontal and a vertical divider for my alert dialog as shown in figure. The only method I am trying is here, better not to refer this code, but I need to design as expected in image. AlertDialog( shape: RoundedRectangleBorder( …
john
  • 447
  • 1
  • 7
  • 11
1
vote
2 answers

How to make fullscreen alertDialog in flutter

I need help to make my alert dialog fullscreen, this is the code i have so far, how can i achieve this? I dont know if its possible to define width as the screen size and height aswell. createNewMessage() { return showDialog( …
André Sousa
  • 187
  • 4
  • 17
1
vote
2 answers

why this alert dialog is not working in flutter

i used below code to get alert whenever user clicks on a particular list item import 'package:flutter/material.dart'; import 'package:rflutter_alert/rflutter_alert.dart'; class RamList extends StatelessWidget { @override Widget…
raman raman
  • 1,655
  • 4
  • 22
  • 34
1
vote
2 answers

How to dismiss alert dialog when clicked outside of it

I have an alert dialog that I want to be dismissed when clicked outside of it, I know this is the default behavior of alert dialogs in flutter, but I don't know what's the problem that's preventing it from closing when clicked outside. I tried to…
1
vote
3 answers

How to pass data from alertdialog to page in flutter?

I am passing data from my alertdialog to item of listview. Where I can find information about it? I tried use TextEditingController, with Navigation Routes. And I used materials from this Tutorial This is my code: class MeasurementsScreen…
CyberDemon
  • 414
  • 1
  • 10
  • 17
0
votes
1 answer

Flutter alert dialog issue

Alert dialog pop not closing. In previously this code is worked as now its not working? when i clicked the cancel or confirm button background navigation is worked but alert cannot close foreground what cause the problem? Dialogs.materialDialog( …
0
votes
0 answers

Showing an alert dialog with an expand-and-crossfade animation

I would like to show an AlertDialog with an "expand and cross-fade" transition originating from the widget that is tapped to open it. Does Flutter provide APIs for this transition, or does it need to be implemented manually? If the latter, how?
0
votes
0 answers

How to setState parent from an AlertDialog that is triggered from a DataTable source?

I've been browsing for a while, but all the answers only answering 1 part of the question. I need to refresh parent state from an AlertDialog that is located inside DataTable source (outside of the state class). This is what I tried Flutter app…
0
votes
1 answer

Do something before leaving page using navigation drawer menu icon

In Fluter, I have some pages with an AppBar that shows the menu icon of the navigation drawer that it is used to navigate among distinct pages. Some of this pages allow the user to edit some data. So, I would like to ask for confirmation when the…
0
votes
0 answers

setState taking ages to update a dialog (Flutter)

Good night everyone. I am having some trouble with a simple dialog to update a file transfer in my app. Every time I get a new progress update I call a function that takes the amount of bytes read and the size of the video. With these I have the…
Raphael Sauer
  • 630
  • 1
  • 6
  • 27