Poll class

Inheritance

Constructors

Poll({required int id, required String question, required List<PollOption> options, required int totalVoterCount, required List<int> recentVoterUserIds, 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)
Parse from a json
factory

Properties

clientId int?
client identifier
no setterinherited
closeDate int
closeDate Point in time (Unix timestamp) when the poll will automatically be closed
final
extra → dynamic
callback sign
no setterinherited
hashCode int
The hash code for this object.
no setterinherited
id int
id Unique poll identifier
final
isAnonymous bool
isAnonymous True, if the poll is anonymous
final
isClosed bool
isClosed True, if the poll is closed
final
openPeriod int
openPeriod Amount of time the poll will be active after creation, in seconds
final
options List<PollOption>
options List of poll answer options
final
question String
question Poll question; 1-300 characters
final
recentVoterUserIds List<int>
recentVoterUserIds User 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
totalVoterCount Total number of voters, participating in the poll
final
type PollType
type Type of the poll
final

Methods

copyWith({int? id, String? question, List<PollOption>? options, int? totalVoterCount, List<int>? recentVoterUserIds, bool? isAnonymous, PollType? type, int? openPeriod, int? closeDate, bool? isClosed}) Poll
getConstructor() String
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson([dynamic extra]) Map<String, dynamic>
override
toString() String
A string representation of this object.
inherited

Operators

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

Constants

CONSTRUCTOR → const String