showNativeAdCarousel method

  1. @override
Widget showNativeAdCarousel({
  1. required Map<String, dynamic> adData,
  2. NativeAdType? adType,
  3. required double width,
  4. double? height,
  5. double? elementWidth,
  6. double? elementHeight,
  7. String? adLabelText,
  8. Alignment? adLabelAlignment,
  9. NativeAdStyle? customStyle,
  10. Widget? customCtaView,
  11. Widget? customBadgeView,
  12. void onAdClicked(
    1. Map<String, dynamic>
    )?,
  13. void onViewLoad(
    1. Map<String, dynamic>
    )?,
  14. void errorCallback(
    1. String error
    )?,
})
override

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

@override
Widget showNativeAdCarousel({
  required Map<String, dynamic> adData,
  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,
}) {
  return NativeAdCarousel(
    adData: adData,
    adType: adType,
    width: width,
    config: _config,
    height: height,
    elementWidth: elementWidth,
    elementHeight: elementHeight,
    adLabelText: adLabelText,
    adLabelAlignment: adLabelAlignment,
    customStyle: customStyle,
    customCtaView: customCtaView,
    customBadgeView: customBadgeView,
    onAdClicked: onAdClicked,
    onViewLoad: onViewLoad,
    errorCallback: errorCallback,
  );
}