File tree Expand file tree Collapse file tree 3 files changed +7
-4
lines changed Expand file tree Collapse file tree 3 files changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -39,7 +39,8 @@ class _MyAppState extends State<MyApp> {
39
39
// You only need to make this call if you want to turn off the screen.
40
40
// Add below permission in your AndroidManifest.xml file.
41
41
// <uses-permission android:name="android.permission.WAKE_LOCK"/>
42
- await ProximitySensor .setProximityScreenOff (true ).onError ((error, stackTrace) {
42
+ await ProximitySensor .setProximityScreenOff (true )
43
+ .onError ((error, stackTrace) {
43
44
if (foundation.kDebugMode) {
44
45
debugPrint ("could not enable screen off functionality" );
45
46
}
Original file line number Diff line number Diff line change @@ -6,7 +6,8 @@ import 'dart:io' show Platform;
6
6
////////////////////////////////////////////////////////////////////////////////
7
7
class ProximitySensor {
8
8
static EventChannel _streamChannel = EventChannel ('proximity_sensor' );
9
- static MethodChannel _methodChannel = MethodChannel ('proximity_sensor_enable' );
9
+ static MethodChannel _methodChannel =
10
+ MethodChannel ('proximity_sensor_enable' );
10
11
11
12
// for ios and android only
12
13
static Stream <int > get events {
@@ -22,7 +23,8 @@ class ProximitySensor {
22
23
// for android only
23
24
static Future <void > setProximityScreenOff (bool enabled) async {
24
25
if (! foundation.kIsWeb && Platform .isAndroid) {
25
- await _methodChannel.invokeMethod <void >('enableProximityScreenOff' , < String , dynamic > {
26
+ await _methodChannel
27
+ .invokeMethod <void >('enableProximityScreenOff' , < String , dynamic > {
26
28
'enabled' : enabled,
27
29
});
28
30
}
Original file line number Diff line number Diff line change 1
1
name : proximity_sensor
2
2
description : simple and easy to use flutter plugin package for proximity sensor (only)
3
- version : 1.3.7
3
+ version : 1.3.8
4
4
homepage : https://github.com/jeremyko/flutter-proximity-sensor-plugin
5
5
6
6
environment :
You can’t perform that action at this time.
0 commit comments