VoteResult class
Result of toggling an upvote on a feature request.
Returned by POST /api/v1/feature-requests/:id/vote.
Example
final result = await client.toggleVote('fr_123', userToken: token);
print('Voted: ${result.voted}, Total count: ${result.voteCount}');
Constructors
- VoteResult({required bool voted, required int voteCount})
-
Creates a VoteResult record.
const
-
VoteResult.fromJson(Map<
String, dynamic> json) -
Deserializes VoteResult from a server JSON response.
factory
Properties
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited