renderNativeAdVerticalView method

Widget renderNativeAdVerticalView({
  1. required String cliUbid,
  2. required NativeAd nativeAd,
  3. required NativeAdType? adType,
  4. required double width,
  5. required double height,
  6. NativeAdStyle? customStyle,
  7. Widget? customCtaView,
  8. Widget? customBadgeView,
  9. String? adLabelText,
  10. Alignment? adLabelAlignment = Alignment.topLeft,
  11. void onAdClicked(
    1. Map<String, dynamic>
    )?,
  12. void onViewLoad(
    1. Map<String, dynamic>
    )?,
})

Implementation

Widget renderNativeAdVerticalView({
  required String cliUbid,
  required NativeAd nativeAd,
  required NativeAdType? adType,
  required double width,
  required double height,
  NativeAdStyle? customStyle,
  Widget? customCtaView,
  Widget? customBadgeView,
  String? adLabelText,
  Alignment? adLabelAlignment = Alignment.topLeft,
  void Function(Map<String, dynamic>)? onAdClicked,
  void Function(Map<String, dynamic>)? onViewLoad,
}) {
  final nativeView = BaseNativeAdView(context).createVerticalAdView(
    adType: adType,
    finalWidth: width,
    finalHeight: height,
    adLabelText: adLabelText,
    adLabelAlignment: adLabelAlignment,
    style: customStyle ?? NativeAdStyle(),
    customCtaView: customCtaView,
    customBadgeView: customBadgeView,
    context: context,
    adData: nativeAd,
  );

  return _buildContainer(
    child: nativeView,
    nativeAd: nativeAd,
    cliUbid: cliUbid,
    onAdClicked: onAdClicked,
    onViewLoad: onViewLoad,
  );
}