Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/amantoux/proximity_screen_lock

A Flutter plugin that de-activates the screen when proximity sensor detects something
https://github.com/amantoux/proximity_screen_lock

flutter lockscreen proximity-sensor

Last synced: 22 days ago
JSON representation

A Flutter plugin that de-activates the screen when proximity sensor detects something

Awesome Lists containing this project

README

        

# Proximity Screen Lock

[![pub package](https://img.shields.io/pub/v/proximity_screen_lock.svg)](https://pub.dartlang.org/packages/proximity_screen_lock)

A Flutter plugin that can be used to bind screen activation to proximity sensor

# Usage

To activate the behavior

```dart
if (ProximityLockScreen.isProximityLockSupported()) {
ProximityLockScreen.setActive(true)
}
```

# Availability

`ProximityLockScreen.isProximityLockAvailable()` will return `false` on Android devices that do not provide a proximity sensor.
It will also return `false` for non-mobile devices

| | iOS | Android | Others |
|----------------------------|-------|---------|-------------|
| `isProximityLockAvailable` | `true` | `true` or `false` | `false` |