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