PollOption class

Represents a poll option that a user can vote for

Annotations
  • @JsonSerializable()

Constructors

PollOption({required int pollId, required int id, required String text, String? createdBy, required int createdAt, required int voteCount, required int updatedAt})
PollOption.fromJson(Map<String, dynamic> json)
factory

Properties

createdAt int
Timestamp (milliseconds) this option was created
final
createdBy String?
ID of the user who has created the poll
getter/setter pair
hashCode int
The hash code for this object.
no setteroverride
id int
ID for an option. This value is unique within a poll.
final
pollId int
ID for the poll to which this option belongs.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
text String
Representation of this option
final
updatedAt int
Timestamp (milliseconds) this option was created
getter/setter pair
voteCount int
Number of votes casted on the option
getter/setter pair

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() Map<String, dynamic>
toString() String
A string representation of this object.
inherited

Operators

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

Static Methods

get({required PollOptionRetrievalParams params, OnPollOptionCallback? onCompleted}) Future<PollOption>
Get Poll Options