getQuestionsAndAnswersByPollId method

Map<QuestionModel, List<AnswerModel>> getQuestionsAndAnswersByPollId(
  1. String pollId
)

Implementation

Map<QuestionModel, List<AnswerModel>> getQuestionsAndAnswersByPollId(String pollId) {
  return Map.fromEntries(
      _expandableDetailList.entries
          .where((entry) => entry.key.pollId == pollId) // Filter by pollId
  );
}