Search code examples
androidflutterscreenlockscreenunlock

How to make the application screen appear when the screen is opened in Flutter


When the lock screen screen opens in Flutter, I want to launch and show my own app.

For example, an app will run on the screen that opens when I press the phone's unlock key. When the user selects the correct meaning of the English word in this application, the screen will open.

Actually what I want to ask is how can I check that the lock screen has been pressed?

I found Lock Screen plugins but they are only for creating a password lock screen.


Solution

  • You can look into the hardware_buttons package. With this package, you can detect the lock screen button pressed. But I'm not sure that there is a way to launch your app with these hardware buttons.