Reputation: 11
How to track how many times does user unlock his/her phone in flutter?
Upvotes: 0
Views: 1037
Reputation: 109
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
Upvotes: 0
Reputation: 1219
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
Upvotes: 1