MastodonPoll class
Mastodon poll.
- Annotations
-
- @JsonSerializable(fieldRename: FieldRename.snake)
Constructors
-
MastodonPoll({required String id, required bool expired, required bool multiple, required int votesCount, required List<
MastodonPollOption> options, required List<MastodonCustomEmoji> emojis, DateTime? expiresAt, int? votersCount, bool? voted, List<int> ? ownVotes}) -
const
-
MastodonPoll.fromJson(Map<
String, dynamic> json) -
factory
Properties
-
emojis
→ List<
MastodonCustomEmoji> -
List of custom emojis used in the poll.
final
- expired → bool
-
Whether the poll has ended.
final
- expiresAt → DateTime?
-
Expiration timestamp of the poll.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- id → String
-
Internal ID of the poll.
final
- multiple → bool
-
Whether multiple choices are allowed.
final
-
options
→ List<
MastodonPollOption> -
List of options.
final
-
ownVotes
→ List<
int> ? -
List of option indices the authenticated user voted for.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- voted → bool?
-
Whether the authenticated user has voted.
final
- votersCount → int?
-
Number of unique voters (differs from votesCount for multiple-choice
polls).
final
- votesCount → int
-
Total number of votes.
final
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toJson(
) → Map< String, dynamic> - Serializes to JSON.
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited