0
answerControllers = new Map<String, dynamic>(); List<dynamic> answersToQuestion = getAnswersOfQuestion(answers, question["id"]); if (!answerControllers.containsKey(question["id"])) { answerControllers[question["id"]] = new Map<dynamic, dynamic>(); if (previousValue == null) { for (dynamic answer in answersToQuestion){ answerControllers[question["id"]][answer["libelle"]]['checked'] = false; } 

And I got this error :

The following NoSuchMethodError was thrown building CreateDemandView(dirty, state: _CreateDemandViewState#d56fe): The method '[]=' was called on null. Receiver: null Tried calling: []=("checked", false)

2
  • 1
    you are getting null value Commented Mar 16, 2022 at 16:46
  • 1
    try mapping directly to the class and see if you get a problem Commented Mar 16, 2022 at 19:58

1 Answer 1

1

make sure in question["id"] there is a value

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.