flutter setstate in dialog code example
Example 1: flutter how to setstate over alertdialog
showDialog(
context: context,
builder: (context) {
String contentText = "Content of Dialog";
return StatefulBuilder(
builder: (context, setState) {
return AlertDialog(blah blah blah....)})})
Example 2: flutter Dialog TextField setState
A very simple solution is to create another stateful widget that renders the content of the dialog. Then, any invocation of the setState will rebuild the content of the dialog.