renderNativeAdVerticalView method
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 onAdClicked()?,
- void onViewLoad()?,
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,
);
}