resolved pr issues
This commit is contained in:
@@ -304,7 +304,7 @@ class _ChatBubbleState extends State<ChatBubble> with SingleTickerProviderStateM
|
||||
var pollId = int.parse(message.originalData!['object']!.id);
|
||||
var pollState = GetPollState(token: widget.bubbleData.token, pollId: pollId).run();
|
||||
showDialog(context: context, builder: (context) => AlertDialog(
|
||||
title: Text(message.originalData!['object']!.name, textScaler: TextScaler.linear(0.9), overflow: TextOverflow.ellipsis),
|
||||
title: Text(message.originalData!['object']!.name, overflow: TextOverflow.ellipsis),
|
||||
content: FutureBuilder(
|
||||
future: pollState,
|
||||
builder: (context, snapshot) {
|
||||
|
||||
@@ -22,8 +22,9 @@ class _PollOptionsListState extends State<PollOptionsList> {
|
||||
var optionId = widget.pollData.options.indexOf(option);
|
||||
var votedSelf = widget.pollData.votedSelf.contains(optionId);
|
||||
var portionsVisible = widget.pollData.votes is Map<String, dynamic>;
|
||||
var votes = !portionsVisible ? 0
|
||||
: (widget.pollData.votes['option-$optionId'] as num?) ?? 0;
|
||||
var votes = portionsVisible
|
||||
? (widget.pollData.votes['option-$optionId'] as num?) ?? 0
|
||||
: 0;
|
||||
var numVoters = widget.pollData.numVoters ?? 0;
|
||||
double portion = numVoters == 0 ? 0 : (votes / numVoters);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user