FastAdInfo.fromJson constructor

FastAdInfo.fromJson(
  1. Map<String, dynamic> json
)

Create a new FastAdInfo instance from a JSON map.

Implementation

factory FastAdInfo.fromJson(Map<String, dynamic> json) {
  return FastAdInfo(
    androidNativeAdUnitId: json['androidNativeAdUnitId'] as String?,
    iosNativeAdUnitId: json['iosNativeAdUnitId'] as String?,
    androidBannerAdUnitId: json['androidBannerAdUnitId'] as String?,
    iosBannerAdUnitId: json['iosBannerAdUnitId'] as String?,
    androidInterstitialAdUnitId:
        json['androidInterstitialAdUnitId'] as String?,
    iosInterstitialAdUnitId: json['iosInterstitialAdUnitId'] as String?,
    androidRewardedAdUnitId: json['androidRewardedAdUnitId'] as String?,
    iosRewardedAdUnitId: json['iosRewardedAdUnitId'] as String?,
    androidSplashAdUnitId: json['androidSplashAdUnitId'] as String?,
    iosSplashAdUnitId: json['iosSplashAdUnitId'] as String?,
    androidRewardedInterstitialAdUnitId:
        json['androidRewardedInterstitialAdUnitId'] as String?,
    iosRewardedInterstitialAdUnitId:
        json['iosRewardedInterstitialAdUnitId'] as String?,
    countries: json['countries'] as List<String>?,
    keywords: json['keywords'] as List<String>?,
    splashAdThreshold:
        json['splashAdThreshold'] as int? ?? kFastSplashAdThreshold,
    adServiceUriAuthority: json['adServiceUriAuthority'] as String?,
    refreshInterval:
        json['refreshInterval'] as int? ?? kFastAdRefreshInterval,
    showRemoveAdLink:
        json['showRemoveAdLink'] as bool? ?? kFastAdShowRemoveAdLink,
    autoRefresh: json['autoRefresh'] as bool? ?? kFastAdAutoRefresh,
    androidNativeAdmobEnabled:
        json['nativeAdmobEnabled'] as bool? ?? kFastNativeAdmobEnabled,
    iosNativeAdmobEnabled:
        json['nativeAdmobEnabled'] as bool? ?? kFastNativeAdmobEnabled,
    interstitialAdThreshold: json['interstitialAdThreshold'] as int? ??
        kFastInterstitialAdThreshold,
    splashAdTimeThreshold:
        json['splashAdTimeThreshold'] as int? ?? kFastAdSplashAdTimeThreshold,
    iosSplashAdUnits: FastAdUnits.fromJson(
      json['iosSplashAdUnits'] as Map<String, dynamic>?,
    ),
    androidSplashAdUnits: FastAdUnits.fromJson(
      json['androidSplashAdUnits'] as Map<String, dynamic>?,
    ),
    iosInterstitialAdUnits: FastAdUnits.fromJson(
      json['iosInterstitialAdUnits'] as Map<String, dynamic>?,
    ),
    androidInterstitialAdUnits: FastAdUnits.fromJson(
      json['androidInterstitialAdUnits'] as Map<String, dynamic>?,
    ),
    iosRewardedAdUnits: FastAdUnits.fromJson(
      json['iosRewardedAdUnits'] as Map<String, dynamic>?,
    ),
    androidRewardedAdUnits: FastAdUnits.fromJson(
      json['androidRewardedAdUnits'] as Map<String, dynamic>?,
    ),
    iosNativeAdUnits: FastAdUnits.fromJson(
      json['iosNativeAdUnits'] as Map<String, dynamic>?,
    ),
    androidNativeAdUnits: FastAdUnits.fromJson(
      json['androidNativeAdUnits'] as Map<String, dynamic>?,
    ),
  );
}