PollVoteChanged<T extends Object> typedef

PollVoteChanged<T extends Object> = FutureOr<void> Function(PollVote<T>? vote)

Called when the user casts, changes, or clears (null) their vote. The returned future is awaited before the "submitting" state clears, so a host app can await a network call before SimplePoll reflects the vote.

Implementation

typedef PollVoteChanged<T extends Object> = FutureOr<void> Function(
  PollVote<T>? vote,
);