I want to show a dialog when a stateless widget is built for the first time in Flutter.
If I add that to the build method it will be shown every time the widget is rebuilt (which the developer can't control directly).
Alternatively I could make my widget stateful and show the dialog in the initState method but then my setState method would be empty and that feels suboptimal.
What is the best practice for this situation? I could for instance introduce a global boolean variable tracking if the dialog has been shown before.