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
3
votes
2 answers

Close AlertDialog on Navigating back from second screen and refresh page flutter

I have a method which check if the current users location is set, if not, open an alert dialog with two buttons: Cancel and Update Profile. the onPressed of the Update Profile button navigates to a second screen with a form to update users location.…
ombiro
  • 869
  • 1
  • 12
  • 19
3
votes
4 answers

How to center AlertDialog FlatButton in Flutter

How can I style the FlatButton to be aligned on center without having to create a custom AlertDialog? AlertDialog( title: Text( 'Alert Dialog'.toUpperCase(), textAlign: TextAlign.center, style: TextStyle(fontWeight:…
jojo
  • 31
  • 1
  • 3
3
votes
1 answer

How to show 2 consecutive Dialogs in Flutter

I have a list with a Dismissible widget. When the user swap startToEnd I would like to sow a dialog when the user can add a note. Once the user click ok in that dialog I would like another dialog to pop to confirm a note was added and then disappear…
M4trix Dev
  • 1,828
  • 3
  • 23
  • 48
2
votes
1 answer

How to implement progressindicator within a alertdialog in flutter?

I am new to flutter and I am trying to learn the platform. So, here I am trying to display information from jsonplaceholder onto a alertdialog while is activated when a button is pressed in main.dart(I haven't included the code here). While the data…
Ritwik Das
  • 23
  • 4
2
votes
1 answer

How to auto dismiss an AlertDialog box after getting GPS point?

I am trying to make a dialog box that displays "text" after getting the location and then doing... Navigator.of(context).pop(); to auto close the dialog Help! I am starting at Flutter... here's the code import 'package:flutter/material.dart'; import…
2
votes
1 answer

AlertDialog button doesn't function in Flutter

I have a TextFormField inside an Alert Dialog which is supposed to close only after the TextFormField value has been validated or show an Error Message in case no input was provided. However, as things stand, the button doesn't seem to work at all…
coolhack7
  • 1,204
  • 16
  • 35
2
votes
1 answer

values in alert dialog not update from outside

I need to show a progress bar like below : I have implemented it this way but the value inside the progress bar is not updated : use upload() function to simulate file upload by submitting a test POST request use StatefulBuilder() for convert my…
Huseyn
  • 372
  • 1
  • 7
  • 20
2
votes
1 answer

RangeError (RangeError (index): Invalid value: Valid value range is empty: 0) error when deleting an item from a list from an alert dialog

I am pretty new to flutter and am following a course and ran into this error: RangeError (RangeError (index): Invalid value: Valid value range is empty: 0) Background The simple app I am writing to learn flutter is a task management app where we…
Ten Digit Grid
  • 1,315
  • 4
  • 22
  • 43
2
votes
1 answer

Incorrect use of ParentDataWidget (No stacktrace)

I have the following layout for an alert dialog: AlertDialog( title: Text('Some Text'), content: StatefulBuilder(builder: (BuildContext context, StateSetter setState) { return Container( height:…
tomerpacific
  • 4,704
  • 13
  • 34
  • 52
2
votes
1 answer

Cannot compile SchedulerBinding.instance.addPostFrameCallback and executeAfterBuild() async not working either

In my app the user is presented with a puzzle, drawn by a re-implementation of Flutter's CustomerPainter class and accepting moves made by tapping on the Canvas. The Canvas is continually updated and re-drawn to show the moves. When the user makes…
Ian Wadham
  • 21
  • 3
2
votes
2 answers

How to return Alert in widget in flutter

I'm trying to create a custom Alert dialogue using this package rflutter_alert . But when return the Alert it gives me this error The argument type 'Future' can't be assigned to the parameter type 'Widget?'. Update: here i created a custom…
TimeToCode
  • 1,458
  • 3
  • 18
  • 60
2
votes
2 answers

flutter alert dialog not updating from outside the function

i want to make a download progress message inside the alert dialog but state not updating inside the the modal the is the download function using dio downloadBook() async { Directory tempDir = await getTemporaryDirectory(); var response =…
FLASH TUBE
  • 33
  • 4
2
votes
1 answer

Flutter Windows : TextField does not allow space if it is placed inside AlertDialog

One hour ago I discovered a TextField strange behavior when I place it inside AlertDialog it does not allow typing space Otherwise it behaves normally here is my code: //================Flutter doctor -v [√] Flutter (Channel stable, 2.0.2, on…
aym1781969
  • 545
  • 1
  • 4
  • 16
2
votes
1 answer

Flutter AlertDialog widget size issue on different resolution devices

https://i.stack.imgur.com/oUxNk.jpg I wanted like this. I have used RadioListTile in ALertDialog. It results in diffrent sized Dialog box in different android devices. Thus resulted in overflowing pixel errors or just a black screen. Here is my…
2
votes
2 answers

Flutter - returning content from AlertDialog

the idea of the code is that when the user press add, he can type a barcode or simply exit from the alert Screen. When the barcode is validated, an object is generated from this barcode, and it is added to the actual market cart. this code already…
user202684
  • 71
  • 2
  • 6
1
2
3
10 11