AlertDialog Widget

Greg Perry
6 min readJan 24, 2020

A look at using one of Flutter’s Dialog Widgets

There is a lot going on ‘under the hood’ when you display what you would think is a simple dialog window with some text and some buttons. See in the screenshot below how the background darkens when presenting to the user a small box with its message and buttons. While the AlertDialog widget is involved in this presentation, there are other widgets working behind the scenes. This article will discuss briefly what’s truly involved as well as give an extensive tour of what makes up the widget, AlterDialog.

Screenshots Only. Click For Gists.

As always, I prefer using screenshots over gists to show code in my articles. I find them easier to work with, and easier to read. However, you can click/tap on them to see the code in a gist or in Github. Ironically, it’s better to read this article about mobile development on your computer than on your phone. Besides, we program mostly on our computers; not on our phones. For now.

No Moving Pictures No Social Media

Note, there will be gif files in this article demonstrating aspects of the topic at hand. However, it’s said viewing such gif files is not possible when reading this article on platforms like Instagram, Facebook, etc. Please, be aware of this and maybe read this article…

--

--