AdInfo constructor

const AdInfo({
  1. @Default(Duration.zero) @JsonKey(fromJson: _durationFromJson, toJson: _durationToJson) Duration duration,
  2. @Default(Duration.zero) @JsonKey(name: 'skip_time_offset', fromJson: _durationFromJson, toJson: _durationToJson) Duration skipTimeOffset,
  3. @Default('') String adid,
  4. @Default(Size.zero) @JsonKey(fromJson: _sizeFromJson, toJson: _sizeToJson) Size size,
  5. @Default('') @JsonKey(name: 'advertiser_name') String advertiserName,
  6. @Default('') @JsonKey(name: 'ad_system') String adSystem,
  7. @Default('') @JsonKey(name: 'content_type') String contentType,
  8. @Default('') String title,
  9. @Default('') String description,
  10. @Default(0) int bitrate,
  11. @Default(false) bool skippable,
  12. @Default(true) bool linear,
  13. @Default(false) @JsonKey(name: 'ui_disabled') bool uiDisabled,
  14. @Default(false) @JsonKey(name: 'is_bumper') bool isBumper,
  15. @Default(0) @JsonKey(name: 'total_ads') int totalAds,
})

Implementation

const factory AdInfo({
  @Default(Duration.zero)
  @JsonKey(fromJson: _durationFromJson, toJson: _durationToJson)
  Duration duration,
  @Default(Duration.zero)
  @JsonKey(
    name: 'skip_time_offset',
    fromJson: _durationFromJson,
    toJson: _durationToJson,
  )
  Duration skipTimeOffset,
  @Default('') String adid,
  @Default(Size.zero)
  @JsonKey(fromJson: _sizeFromJson, toJson: _sizeToJson)
  Size size,
  @Default('') @JsonKey(name: 'advertiser_name') String advertiserName,
  @Default('') @JsonKey(name: 'ad_system') String adSystem,
  @Default('') @JsonKey(name: 'content_type') String contentType,
  @Default('') String title,
  @Default('') String description,
  @Default(0) int bitrate,
  @Default(false) bool skippable,
  @Default(true) bool linear,
  @Default(false) @JsonKey(name: 'ui_disabled') bool uiDisabled,
  @Default(false) @JsonKey(name: 'is_bumper') bool isBumper,
  @Default(0) @JsonKey(name: 'total_ads') int totalAds,
}) = _AdInfo;