InputMessagePoll class final

A message with a poll. Polls can't be sent to secret chats. Polls can be sent only to a private chat with a bot

Inheritance

Constructors

InputMessagePoll({required String question, required List<String> options, required bool isAnonymous, required PollType type, required int openPeriod, required int closeDate, required bool isClosed})
A message with a poll. Polls can't be sent to secret chats. Polls can be sent only to a private chat with a bot
const
InputMessagePoll.fromJson(Map<String, dynamic> json)
Parses a InputMessagePoll 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; for bots only
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
isAnonymous → bool
True, if the poll voters are anonymous. Non-anonymous polls can't be sent or forwarded to channels
final
isClosed → bool
True, if the poll needs to be sent already closed; for bots only
final
openPeriod → int
Amount of time the poll will be active after creation, in seconds; for bots only
final
options → List<String>
List of poll answer options, 2-10 strings 1-100 characters each
final
question → String
Poll question; 1-255 characters (up to 300 characters for bots)
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
type → PollType
Type of the poll
final

Methods

copyWith({String? question, List<String>? options, bool? isAnonymous, PollType? type, int? openPeriod, int? closeDate, bool? isClosed}) → InputMessagePoll
Returns a copy with the given fields replaced. For a nullable field pass a function, e.g. field: () => null to clear it.
override
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.