Search code examples
androidiosflutterdartlockscreen

How can I lock Device not just the App but the whole device in flutter?


I am working on a project which requires a device lock Button that enables users from the app to lock the entire device. Is there a way, package or any Platform plugin that I can use to implement that?

Thanks guys.


Solution

  • Below plugin can help to lock phone in android.

    https://pub.dev/packages/device_policy_manager

    All details are provided on the plugin page.