PollMedia constructor

const PollMedia({
  1. @JsonKey.new(name: 'animation') Animation? animation,
  2. @JsonKey.new(name: 'audio') Audio? audio,
  3. @JsonKey.new(name: 'document') Document? document,
  4. @JsonKey.new(name: 'link') Link? link,
  5. @JsonKey.new(name: 'live_photo') LivePhoto? livePhoto,
  6. @JsonKey.new(name: 'location') Location? location,
  7. @JsonKey.new(name: 'photo') List<PhotoSize>? photo,
  8. @JsonKey.new(name: 'sticker') Sticker? sticker,
  9. @JsonKey.new(name: 'venue') Venue? venue,
  10. @JsonKey.new(name: 'video') Video? video,
})

Creates a new PollMedia object.

Implementation

const factory PollMedia({
  /// Optional. Media is an animation, information about the animation
  @JsonKey(name: 'animation') final Animation? animation,

  /// Optional. Media is an audio file, information about the file; currently,
  /// can't be received in a poll option
  @JsonKey(name: 'audio') final Audio? audio,

  /// Optional. Media is a general file, information about the file;
  /// currently, can't be received in a poll option
  @JsonKey(name: 'document') final Document? document,

  /// Optional. The HTTP link attached to the poll option
  @JsonKey(name: 'link') final Link? link,

  /// Optional. Media is a live photo, information about the live photo
  @JsonKey(name: 'live_photo') final LivePhoto? livePhoto,

  /// Optional. Media is a shared location, information about the location
  @JsonKey(name: 'location') final Location? location,

  /// Optional. Media is a photo, available sizes of the photo
  @JsonKey(name: 'photo') final List<PhotoSize>? photo,

  /// Optional. Media is a sticker, information about the sticker;
  /// currently, for poll options only
  @JsonKey(name: 'sticker') final Sticker? sticker,

  /// Optional. Media is a venue, information about the venue
  @JsonKey(name: 'venue') final Venue? venue,

  /// Optional. Media is a video, information about the video
  @JsonKey(name: 'video') final Video? video,
}) = _PollMedia;