showPdaAd abstract method
- required Map<
String, dynamic> ad, - required String cliUbid,
- required NativeAdType adType,
- required double width,
- double? height,
- double? imageHeight,
- bool layoutHorizontal = false,
- double mediaRatio = 0.6,
- double? plaItemWidth,
- double? plaItemHeight,
- NativeAdStyle? plaCustomStyle,
- Widget? plaCustomCtaView,
- Widget? plaCustomBadgeView,
- String? plaAdLabelText,
- String? adLabelText,
- Alignment? adLabelAlignment,
- Widget? customCtaView,
- Widget? customBadgeView,
- NativeAdStyle? customStyle,
- void onAdClicked()?,
- void onAdLoaded()?,
- void onProductClicked(
- dynamic
Creates a PDA (Product Display Ad) widget.
ad - Required ad data containing PDA information
adType - Optional type of native ad (affects PLA layout)
width - Required width of the PDA in logical pixels
height - Optional height of the PDA in logical pixels
imageHeight - Optional height of the media section
layoutHorizontal - Optional horizontal layout (media left, PLA right). Default: false (vertical)
mediaRatio - Optional media to PLA ratio for horizontal layout (0.0-1.0). Default: 0.6
plaItemWidth - Optional width of individual PLA items. Default: auto-calculated
plaItemHeight - Optional height of individual PLA items. Default: auto-calculated
plaCustomStyle - Optional custom styling for PLA items
plaCustomCtaView - Optional custom CTA view for PLA items
plaCustomBadgeView - Optional custom badge view for PLA items
plaAdLabelText - Optional label text for PLA items
cliUbid - Required client unique identifier for PLA tracking
adLabelText - Optional label text displayed on the ad
adLabelAlignment - Optional Flutter Alignment for the label text
customCtaView - Optional custom call-to-action view
customBadgeView - Optional custom badge view
customStyle - Optional custom styling for the ad
onAdClicked - Optional callback triggered when the ad is clicked
onAdLoaded - Optional callback triggered when the ad loads
onProductClicked - Optional callback triggered when a product is clicked
Returns a Widget that displays the PDA advertisement
Implementation
Widget showPdaAd({
required Map<String, dynamic> ad,
required String cliUbid,
required NativeAdType adType,
required double width,
double? height,
double? imageHeight,
bool layoutHorizontal = false,
double mediaRatio = 0.6,
double? plaItemWidth,
double? plaItemHeight,
NativeAdStyle? plaCustomStyle,
Widget? plaCustomCtaView,
Widget? plaCustomBadgeView,
String? plaAdLabelText,
String? adLabelText,
Alignment? adLabelAlignment,
Widget? customCtaView,
Widget? customBadgeView,
NativeAdStyle? customStyle,
void Function(Map<String, dynamic>)? onAdClicked,
void Function(Map<String, dynamic>)? onAdLoaded,
void Function(dynamic)? onProductClicked,
});