showNativeAdCarousel abstract method
- required Map<
String, dynamic> adData, - required NativeAdType? adType,
- required double width,
- double? height,
- double? elementWidth,
- double? elementHeight,
- String? adLabelText,
- Alignment? adLabelAlignment,
- NativeAdStyle? customStyle,
- Widget? customCtaView,
- Widget? customBadgeView,
- void onAdClicked()?,
- void onViewLoad()?,
- void errorCallback(
- String error
Creates a native ad carousel widget with the specified configuration.
adData - Required map containing native ad data structure
adType - Type of native ad layout
width - Width of native ad carousel in pixels
height - Optional height of native ad carousel in pixels
elementWidth - Optional width of individual native ad elements
adLabelText - Optional label text displayed on ads
adLabelAlignment - Optional alignment for the label text
customStyle - Optional custom styling for the native ads
customCtaView - Optional custom CTA view widget
customBadgeView - Optional custom badge view widget
onAdClicked - Optional callback triggered when an ad is clicked
onViewLoad - Optional callback triggered when an ad view is loaded
errorCallback - Optional error callback
Returns a Widget that displays the native ad carousel
Implementation
Widget showNativeAdCarousel({
required Map<String, dynamic> adData,
required NativeAdType? adType,
required double width,
double? height,
double? elementWidth,
double? elementHeight,
String? adLabelText,
Alignment? adLabelAlignment,
NativeAdStyle? customStyle,
Widget? customCtaView,
Widget? customBadgeView,
void Function(Map<String, dynamic>)? onAdClicked,
void Function(Map<String, dynamic>)? onViewLoad,
void Function(String error)? errorCallback,
});