setActive method

  1. @override
Future<void> setActive(
  1. bool value
)
override

If set to true will de-activate screen if proximity sensor detects something For Android, if used and proximity wake lock is not available, this will throw

If proximity sensor is already active (resp. inactive) setting value to true (resp. false) has no effect.

Implementation

@override
Future<void> setActive(bool value) async {
  await methodChannel.invokeMethod('setActive', value);
}