AdInfo constructor
const
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,
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;