Check if screen is kept on
static Future<bool?> isScreenKeptOn() { if (Platform.isAndroid || Platform.isIOS) { return _channel.invokeMethod("isScreenKeptOn"); } return Future.value(false); }