I have my code written like this but it gives an error saying:
Error: A value of type 'List' can't be assigned to a variable of type 'Widget'.
Column(
children: [
Question(
questions[_questionIndex]['questionText'],
),
...(questions[_questionIndex]['answers'] as List<String>)
.map((answer) {
return Answer(_answerQuestion, answer);
}).toList()
],
)