showPresentation static method

Future<bool> showPresentation({
  1. required int displayId,
  2. required String routerName,
})

Show presentation on external display

displayId: The display ID to show presentation on routerName: The route name for the Flutter view

Implementation

static Future<bool> showPresentation({required int displayId, required String routerName}) async {
  try {
    final arguments = json.encode({'displayId': displayId, 'routerName': routerName});

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