How to show an AlertDialog with a background task in Flutter
If you have any state management implemented like bloc or flutter_redux or mobX, you can have a field in your state like "bool showAlert
" and have a streambuilder which will listen to your app state changes and show the alert dialog when "showAlert" property is true.