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> {
3939 // You only need to make this call if you want to turn off the screen.
4040 // Add below permission in your AndroidManifest.xml file.
4141 // <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) {
4344 if (foundation.kDebugMode) {
4445 debugPrint ("could not enable screen off functionality" );
4546 }
Original file line number Diff line number Diff line change @@ -6,7 +6,8 @@ import 'dart:io' show Platform;
66////////////////////////////////////////////////////////////////////////////////
77class ProximitySensor {
88 static EventChannel _streamChannel = EventChannel ('proximity_sensor' );
9- static MethodChannel _methodChannel = MethodChannel ('proximity_sensor_enable' );
9+ static MethodChannel _methodChannel =
10+ MethodChannel ('proximity_sensor_enable' );
1011
1112 // for ios and android only
1213 static Stream <int > get events {
@@ -22,7 +23,8 @@ class ProximitySensor {
2223 // for android only
2324 static Future <void > setProximityScreenOff (bool enabled) async {
2425 if (! foundation.kIsWeb && Platform .isAndroid) {
25- await _methodChannel.invokeMethod <void >('enableProximityScreenOff' , < String , dynamic > {
26+ await _methodChannel
27+ .invokeMethod <void >('enableProximityScreenOff' , < String , dynamic > {
2628 'enabled' : enabled,
2729 });
2830 }
Original file line number Diff line number Diff line change 11name : proximity_sensor
22description : simple and easy to use flutter plugin package for proximity sensor (only)
3- version : 1.3.7
3+ version : 1.3.8
44homepage : https://github.com/jeremyko/flutter-proximity-sensor-plugin
55
66environment :
You can’t perform that action at this time.
0 commit comments