showAd abstract method

Widget showAd({
  1. required Map<String, dynamic> adData,
  2. required Widget contentView,
  3. void onAdClick(
    1. Map
    )?,
  4. void onViewAppeared(
    1. Map,
    2. String
    )?,
})

Creates a native ad widget with the specified configuration.

adData - Required ad metadata to display the native ad contentView - Required custom content view onAdClick - Optional callback triggered when the ad is clicked onViewAppeared - Optional callback triggered when the ad appears

Returns a Widget that displays the native advertisement

Implementation

Widget showAd({
  required Map<String, dynamic> adData,
  required Widget contentView,
  void Function(Map)? onAdClick,
  void Function(Map, String)? onViewAppeared,
});