toMap method

Map<String, dynamic> toMap()

Converts this configuration to a map for platform channel communication.

Returns a map containing only non-null values.

Implementation

Map<String, dynamic> toMap() {
  return {
    if (keywords != null) 'keywords': keywords,
    if (contentUrl != null) 'contentUrl': contentUrl,
    if (testDevices != null) 'testDevices': testDevices,
    if (nonPersonalizedAds != null) 'nonPersonalizedAds': nonPersonalizedAds,
  };
}