Home > front end >  How to track the time when the phone lock is open of closed?
How to track the time when the phone lock is open of closed?

Time:03-21

How to track how many times does user unlock his/her phone in flutter?

CodePudding user response:

That is something very platform specific. Because this is a rather unusual Usecase I doubt that there is any package that offers this functionality. Therefore you will probably have to use MethodChannels and implement it with platform specific code for each platform you want to support. Here is an explanation on how to do it for android: Android - detect phone unlock event, not screen on

CodePudding user response:

You can use this library for this situation: https://pub.dev/packages/is_lock_screen

With this library you can counter how many times locked and unlocked phone in flutter

  • Related