Home > Software engineering >  Home button in flutter
Home button in flutter

Time:11-19

How can I make a show dialog when the user pressed home button or my app go to inactive and pause in flutter I need show dialog to make him understand If he quit he lose all data in exam

CodePudding user response:

In Android, you can show a floating view that looks like a dialog when the app is inactivated.

First, check if the app is inactivated by using the WidgetsBindingObserver in Flutter. Second, implement a dialog view in native. The floating view example is here.

CodePudding user response:

As far as I know there is no way you can do it. iOS simply will NOT allow you to do that, and as far as I know Android neither.

  • Related