How to Refresh AlertDialog with setState in Flutter
When you show AlertDialog with showDialog() in Flutter, it appears with a different state, so whenever you call setState(), the content inside AlertDialog will not refresh. To refresh AlertDialog with setState, see the example below: