Skip to content

Commit 187ee46

Browse files
committed
refactor: dart format
1 parent d297bd3 commit 187ee46

File tree

3 files changed

+7
-4
lines changed

3 files changed

+7
-4
lines changed

example/lib/main.dart

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff 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
}

lib/proximity_sensor.dart

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@ import 'dart:io' show Platform;
66
////////////////////////////////////////////////////////////////////////////////
77
class 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
}

pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: proximity_sensor
22
description: simple and easy to use flutter plugin package for proximity sensor (only)
3-
version: 1.3.7
3+
version: 1.3.8
44
homepage: https://github.com/jeremyko/flutter-proximity-sensor-plugin
55

66
environment:

0 commit comments

Comments
 (0)