showAd abstract method
Displays an interstitial ad with the specified configuration.
context - Required BuildContext for calculating dimensions
adData - Required ad metadata to display the interstitial ad
width - Optional width of the interstitial ad view in pixels
height - Optional height of the interstitial ad view in pixels
alignment - Optional alignment of the ad on screen (default is "CENTER")
adLabelText - Optional text for the ad label
adLabelAlignment - Optional alignment for the ad label (default is "topLeading")
x - Optional X-axis offset for custom ad positioning (default is 0)
y - Optional Y-axis offset for custom ad positioning (default is 0)
onAdClicked - Optional callback triggered when the ad is clicked
onAdAppeared - Optional callback triggered when the ad appears
Returns a Future that completes when the ad is displayed
Implementation
Future<void>? showAd({
required BuildContext context,
required Map<String, dynamic> adData,
int? width,
int? height,
String? alignment,
String? adLabelText,
Alignment? adLabelAlignment,
int? x,
int? y,
void Function(Map? ad)? onAdClicked,
void Function(Map? ad, String? trackingId)? onAdAppeared,
});