Poll participate

This commit is contained in:
2025-02-13 22:35:53 +08:00
parent 4937dee182
commit cb24bd953d
9 changed files with 374 additions and 190 deletions

View File

@ -24,7 +24,8 @@ class SnPoll with _$SnPoll {
class SnPollMetric with _$SnPollMetric {
const factory SnPollMetric({
required int totalAnswer,
required dynamic byOptions,
@Default({}) Map<String, int> byOptions,
@Default({}) Map<String, int> byOptionsPercentage,
}) = _SnPollMetric;
factory SnPollMetric.fromJson(Map<String, Object?> json)