InputMessagePoll class final

InputMessagePoll (inputMessagePoll) - child of InputMessageContent

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.

  • question: Poll question; 1-255 characters (up to 300 characters for bots). Only custom emoji entities are allowed to be added and only by Premium users.
  • options: List of poll answer options, 2-10 strings 1-100 characters each. Only custom emoji entities are allowed to be added and only by Premium users.
  • isAnonymous: True, if the poll voters are anonymous. Non-anonymous polls can't be sent or forwarded to channels.
  • type: Type of the poll.
  • openPeriod: Amount of time the poll will be active after creation, in seconds; for bots only.
  • closeDate: Point in time (Unix timestamp) when the poll will automatically be closed; for bots only.
  • isClosed: True, if the poll needs to be sent already closed; for bots only.
Inheritance

Constructors

InputMessagePoll({required FormattedText question, required List<FormattedText> options, required bool isAnonymous, required PollType type, required int openPeriod, required int closeDate, required bool isClosed})
InputMessagePoll (inputMessagePoll) - child of InputMessageContent
const
InputMessagePoll.fromJson(Map<String, dynamic> json)
Parse from a json
factory

Properties

clientId → int?
Client ID, from which this object was received
no setterinherited
closeDate → int
Point in time (Unix timestamp) when the poll will automatically be closed; for bots only
final
currentObjectId → String
TDLib object type for current class instance
no setteroverride
extra → dynamic
A sign from TDLib update
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<FormattedText>
List of poll answer options, 2-10 strings 1-100 characters each. Only custom emoji entities are allowed to be added and only by Premium users
final
question → FormattedText
Poll question; 1-255 characters (up to 300 characters for bots). Only custom emoji entities are allowed to be added and only by Premium users
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
type → PollType
Type of the poll
final

Methods

copyWith({FormattedText? question, List<FormattedText>? options, bool? isAnonymous, PollType? type, int? openPeriod, int? closeDate, bool? isClosed}) → InputMessagePoll
Copy model with modified properties.
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() → Map<String, dynamic>
Convert model to TDLib JSON format
override
toString() → String
Convert model to TDLib JSON format, encoded into String.
override

Operators

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

Constants

defaultObjectId → const String
TDLib object type