isScreenKeptOn method Null safety

Future<bool> isScreenKeptOn()

Check if screen is kept on

Implementation

static Future<bool> isScreenKeptOn() async {
  if (Platform.isAndroid || Platform.isIOS) {
    var keptOn = await _channel.invokeMethod("isScreenKeptOn");
    if (keptOn != null) {
      return Future.value(keptOn);
    }
  }
  return Future.value(false);
}