hideBannerAd method

Future<bool> hideBannerAd(
  1. String bannerId
)

Hides a banner ad.

bannerId - The unique ID of the banner ad to hide.

Returns true if the banner is hidden successfully, false otherwise.

Implementation

Future<bool> hideBannerAd(String bannerId) async {
  try {
    final result = await _channel.invokeMethod<bool>(
      'hideBannerAd',
      {'bannerId': bannerId},
    );
    return result ?? false;
  } catch (e) {
    debugPrint('Error hiding banner ad: $e');
    return false;
  }
}