PollMedia class abstract
This object represents media attached to a poll.
- Available extensions
- Annotations
-
- @freezed
Constructors
-
PollMedia({@JsonKey.new(name: 'animation') Animation? animation, @JsonKey.new(name: 'audio') Audio? audio, @JsonKey.new(name: 'document') Document? document, @JsonKey.new(name: 'link') Link? link, @JsonKey.new(name: 'live_photo') LivePhoto? livePhoto, @JsonKey.new(name: 'location') Location? location, @JsonKey.new(name: 'photo') List<
PhotoSize> ? photo, @JsonKey.new(name: 'sticker') Sticker? sticker, @JsonKey.new(name: 'venue') Venue? venue, @JsonKey.new(name: 'video') Video? video}) -
Creates a new PollMedia object.
constfactory
-
PollMedia.fromJson(Map<
String, dynamic> json) -
Creates a new PollMedia object from a JSON Map.
factory
Properties
- animation → Animation?
-
Optional. Media is an animation, information about the animation
no setterinherited
- audio → Audio?
-
Optional. Media is an audio file, information about the file; currently,
can't be received in a poll option
no setterinherited
-
copyWith
→ $PollMediaCopyWith<
PollMedia> -
Create a copy of PollMedia
with the given fields replaced by the non-null parameter values.
no setterinherited
- document → Document?
-
Optional. Media is a general file, information about the file;
currently, can't be received in a poll option
no setterinherited
- hashCode → int
-
The hash code for this object.
no setterinherited
- link → Link?
-
Optional. The HTTP link attached to the poll option
no setterinherited
- livePhoto → LivePhoto?
-
Optional. Media is a live photo, information about the live photo
no setterinherited
- location → Location?
-
Optional. Media is a shared location, information about the location
no setterinherited
-
photo
→ List<
PhotoSize> ? -
Optional. Media is a photo, available sizes of the photo
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- sticker → Sticker?
-
Optional. Media is a sticker, information about the sticker;
currently, for poll options only
no setterinherited
- venue → Venue?
-
Optional. Media is a venue, information about the venue
no setterinherited
- video → Video?
-
Optional. Media is a video, information about the video
no setterinherited
Methods
-
map<
TResult extends Object?> (TResult $default(_PollMedia value)) → TResult -
Available on PollMedia, provided by the PollMediaPatterns extension
Aswitch-like method, using callbacks. -
mapOrNull<
TResult extends Object?> (TResult? $default(_PollMedia value)?) → TResult? -
Available on PollMedia, provided by the PollMediaPatterns extension
A variant ofmapthat fallback to returningnull. -
maybeMap<
TResult extends Object?> (TResult $default(_PollMedia value)?, {required TResult orElse()}) → TResult -
Available on PollMedia, provided by the PollMediaPatterns extension
A variant ofmapthat fallback to returningorElse. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toJson(
) → Map< String, dynamic> -
Serializes this PollMedia to a JSON map.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited