PollOption class abstract

This object contains information about one answer option in a poll.

Annotations
  • @freezed

Constructors

PollOption.new({@JsonKey(name: 'text') required String text, @JsonKey(name: 'voter_count') required int voterCount, @JsonKey(name: 'text_entities') List<MessageEntity>? textEntities})
Constructs a PollOption object.
const
factory
PollOption.fromJson(Map<String, dynamic> json)
Creates a PollOption object from JSON object.
factory

Properties

copyWith → $PollOptionCopyWith<PollOption>
Create a copy of PollOption with the given fields replaced by the non-null parameter values.
no setterinherited
hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
text String
Option text, 1-100 characters
no setterinherited
textEntities List<MessageEntity>?
Optional. Special entities that appear in the option text. Currently, only custom emoji entities are allowed in poll option texts
no setterinherited
voterCount int
Number of users that voted for this option
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() Map<String, dynamic>
Serializes this PollOption to a JSON map.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited