Poll<T extends Object> class
- Annotations
Constructors
Properties
- allowsMultipleAnswers → bool
-
If true, users can select more than one option before submitting their vote.
final
- endsAt → DateTime?
-
final
- hasEnded → bool
-
True only when endsAt is set and already in the past. A poll with no endsAt never ends.
no setter
- hashCode → int
-
The hash code for this object.
no setterinherited
- isActive → bool
-
True when the poll can still accept votes: either it has no endsAt, or endsAt is still in the future.
no setter
- isEditable → bool
-
If true, a voted poll shows an "undo" action to clear the vote and vote again.
final
-
options
→ List<
PollOption< T> > -
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- title → String
-
The question/topic being polled, and the answers available for it.
final
- totalVotes → int
-
no setter
Methods
-
copyWith(
{String? title, List< PollOption< ? options, DateTime? endsAt, bool? allowsMultipleAnswers, bool? isEditable}) → Poll<T> >T> -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
-
withVoteApplied(
{required PollVote< T> ? previousVote, required PollVote<T> ? newVote}) → Poll<T> -
Returns a copy with
previousVote's counts removed andnewVote's counts added, so a host app can optimistically update vote counts locally after a PollVoteChanged callback fires.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited