toMap property

Map<String, Object> get toMap

Convert to map to pass to customOptions in NativeAd

Implementation

Map<String, Object> get toMap {
  return {
    'nativeAdSize': () {
      switch (nativeAdSize) {
        case NativeAdSize.fullScreen:
          return 'fullScreen';
        case NativeAdSize.inline:
          return 'inline';
      }
    }(),
    'adMediaConfig': adMediaConfig.toMap,
    'adStarsConfig': adStarsConfig.toMap,
    'adPriceConfig': adPriceConfig.toMap,
    'adStoreConfig': adStoreConfig.toMap,
    'adHeadlineConfig': adHeadlineConfig.toMap,
    'adAdvertiserConfig': adAdvertiserConfig.toMap,
    'adIconConfig': adIconConfig.toMap,
    'adBodyConfig': adBodyConfig.toMap,
    'adActionButtonConfig': adActionButtonConfig.toMap,
    'backgroundColor': backgroundColor,
    'adLayoutConfig': adLayoutConfig.toMap,
  };
}