toMap method

Map<String, dynamic> toMap()

Converts the break clip object to a map for serialization.

Implementation

Map<String, dynamic> toMap() {
  return {
    'clickThroughUrl': clickThroughUrl,
    'contentId': contentId,
    'contentType': contentType,
    'contentUrl': contentUrl,
    'customData': customData,
    'duration': duration?.inSeconds,
    'hlsSegmentFormat': hlsSegmentFormat?.name,
    'id': id,
    'posterUrl': posterUrl,
    'title': title,
    'vastAdsRequest': vastAdsRequest.toMap(),
    'whenSkippable': whenSkippable?.inSeconds,
  };
}