Poll class final

Describes a poll

Inheritance

Constructors

Poll({required int id, required String question, required List<PollOption> options, required int totalVoterCount, required List<MessageSender> recentVoterIds, required bool isAnonymous, required PollType type, required int openPeriod, required int closeDate, required bool isClosed})
Describes a poll
const
Poll.fromJson(Map<String, dynamic> json)
Parses a Poll from TDLib JSON.
factory

Properties

clientId → int?
Identifier of the TDLib client that sent this object, when known.
no setterinherited
closeDate → int
Point in time (Unix timestamp) when the poll will automatically be closed
final
extra → dynamic
"@extra" of the request this object answers; null for updates.
no setterinherited
hashCode → int
The hash code for this object.
no setterinherited
id → int
Unique poll identifier
final
isAnonymous → bool
True, if the poll is anonymous
final
isClosed → bool
True, if the poll is closed
final
openPeriod → int
Amount of time the poll will be active after creation, in seconds
final
options → List<PollOption>
List of poll answer options
final
question → String
Poll question; 1-300 characters
final
recentVoterIds → List<MessageSender>
Identifiers of recent voters, if the poll is non-anonymous
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
totalVoterCount → int
Total number of voters, participating in the poll
final
type → PollType
Type of the poll
final

Methods

copyWith({int? id, String? question, List<PollOption>? options, int? totalVoterCount, List<MessageSender>? recentVoterIds, bool? isAnonymous, PollType? type, int? openPeriod, int? closeDate, bool? isClosed}) → Poll
Returns a copy with the given fields replaced. For a nullable field pass a function, e.g. field: () => null to clear it.
getConstructor() → String
TDLib type name, e.g. updateNewMessage.
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() → Map<String, dynamic>
Converts this object to TDLib JSON.
override
toString() → String
A string representation of this object.
inherited

Operators

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

Constants

CONSTRUCTOR → const String
TDLib type name.