谁能详细解释这段代码中发生了什么,我被困住了

问题描述 投票:-2回答:1

列(儿童:[题(问题[_questionIndex] ['questionText'],),...(问题[_questionIndex] ['answers']作为列表).map((answer){返回答案(_answerQuestion,答案);} .toList()],)

flutter flutter-layout
1个回答
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() 
  ], 
)

因此,该列存在一个问题小部件和一些答案小部件。您需要更多详细信息吗?

© www.soinside.com 2019 - 2024. All rights reserved.