任何人都可以详细解释这段代码中发生的事情吗?我被困住了
Column(
children: [
Question(
questions[_questionIndex]['questionText'],
),
...(questions[_questionIndex]['answers'] as List<String>)
.map((answer) {
return Answer(_answerQuestion, answer);
}).toList()
],
)
请帮助我,谢谢!
答案 0 :(得分:0)
Column(
children: [
Question( questions[_questionIndex]['questionText'], ), ...
( // I guess this brace should not be here
questions[_questionIndex]['answers'] as List).map((answer) {
return Answer(_answerQuestion, answer);
}).toList()
],
)
因此,该列存在一个问题小部件和一些答案小部件。您需要更多详细信息吗?