hidePip method

Future<void> hidePip()

Implementation

Future<void> hidePip() async {
  // iOS native SDK doesn't support hidePip - only Android does
  if (Platform.isIOS) {
    debugPrint('hidePip is not supported on iOS');
    return;
  }

  try {
    await MethodHandler.invokeNativeMethod("pipAdView_hide");
  } on OsmosException {
    rethrow;
  } catch (e) {
    throw OsmosException(
      errorCode: OsmosErrorCodes.pipAdError,
      details: 'Failed to hide PIP ad: ${e.toString()}',
      nativeError: e,
    );
  }
}