🐛 Poll bug fixes
This commit is contained in:
@@ -333,7 +333,8 @@ class _PollSubmitState extends ConsumerState<PollSubmit> {
|
||||
switch (q.type) {
|
||||
case SnPollQuestionType.rating:
|
||||
// rating: avg score (double or int)
|
||||
final avg = (raw['rating'] as num).toDouble();
|
||||
final avg = (raw['rating'] as num?)?.toDouble();
|
||||
if (avg == null) break;
|
||||
final theme = Theme.of(context);
|
||||
body = Row(
|
||||
mainAxisAlignment: MainAxisAlignment.start,
|
||||
|
@@ -571,7 +571,7 @@ class PostItem extends HookConsumerWidget {
|
||||
onSubmit: (_) {},
|
||||
).padding(horizontal: 16, vertical: 12),
|
||||
),
|
||||
_ => const Placeholder(),
|
||||
_ => Text('Unable show embed: ${embedData['type']}'),
|
||||
},
|
||||
)),
|
||||
if (isShowReference)
|
||||
|
Reference in New Issue
Block a user