PollOption class

Inheritance

Constructors

PollOption({required String text, required int voterCount, required int votePercentage, required bool isChosen, required bool isBeingChosen})
Describes one answer option of a poll
const
PollOption.fromJson(Map<String, dynamic> json)
Parse from a json
factory

Properties

clientId → int?
client identifier
no setterinherited
extra → dynamic
callback sign
no setterinherited
hashCode → int
The hash code for this object.
no setterinherited
isBeingChosen → bool
isBeingChosen True, if the option is being chosen by a pending setPollAnswer request
final
isChosen → bool
isChosen True, if the option was chosen by the user
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
text → String
text Option text; 1-100 characters
final
votePercentage → int
votePercentage The percentage of votes for this option; 0-100
final
voterCount → int
voterCount Number of voters for this option, available only for closed or voted polls
final

Methods

copyWith({String? text, int? voterCount, int? votePercentage, bool? isChosen, bool? isBeingChosen}) → PollOption
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