screen_lock_detector 2.0.0 copy "screen_lock_detector: ^2.0.0" to clipboard
screen_lock_detector: ^2.0.0 copied to clipboard

A Flutter plugin to detect screen lock/unlock events across Android and iOS platforms.

Changelog #

2.0.0 #

  • Updates minimum supported SDK version to Flutter 3.44 / Dart 3.12
  • Migrates Android to Flutter 3.44 built-in Kotlin support
  • Adds FlutterFramework dependency and improves tests on iOS
  • Fix iOS: NotificationCenter observers are now removed in deinit to prevent crash and duplicate events on engine detach / add-to-app
  • Fix iOS: checkScreenStatus() initial value changed from UNLOCKED to UNKNOWN so the first real lock/unlock notification is never suppressed
  • Fix Android: BroadcastReceiver is now guarded against double-registration when the stream is resubscribed
  • Fix Android: onCancel now safely handles unregistering a never-registered receiver
  • Fix Android: null appContext in onListen now surfaces an error instead of silently dropping receiver registration
  • BREAKING: ScreenStatus.name renamed to ScreenStatus.value to stop shadowing Dart's built-in Enum.name

1.0.0 #

  • Detect when the screen is locked
  • Detect when the screen is unlocked
  • Supports both event streams and manual status checks
  • Works on Android and iOS
8
likes
160
points
194
downloads
screenshot

Documentation

API reference

Publisher

verified publishermrrhak.com

Weekly Downloads

A Flutter plugin to detect screen lock/unlock events across Android and iOS platforms.

Homepage
Repository (GitHub)
View/report issues
Contributing

Topics

#screen-lock-detector #screen-lock #device-lock #lockscreen

Funding

Consider supporting this project:

ko-fi.com

License

MIT (license)

Dependencies

flutter, plugin_platform_interface

More

Packages that depend on screen_lock_detector

Packages that implement screen_lock_detector