showBannerAd method
Shows a previously loaded banner ad.
bannerId - The unique ID of the banner ad to show.
Returns true if the banner is shown successfully, false otherwise.
Implementation
Future<bool> showBannerAd(String bannerId) async {
try {
final result = await _channel.invokeMethod<bool>(
'showBannerAd',
{'bannerId': bannerId},
);
return result ?? false;
} catch (e) {
debugPrint('Error showing banner ad: $e');
return false;
}
}