hidePresentation static method

Future<bool> hidePresentation(
  1. int displayId
)

Hide presentation from external display

displayId: The display ID to hide presentation from

Implementation

static Future<bool> hidePresentation(int displayId) async {
  try {
    final arguments = json.encode({'displayId': displayId});

    final result = await _channel.invokeMethod('hidePresentation', arguments);
    return result == true;
  } catch (e) {
    print('Error hiding presentation: $e');
    return false;
  }
}