如何使用一行中的列表颤振



我尝试使用一个列表,我已经创建了一行,但我一直得到这个错误lib/main.dart:94:21: Error: The argument type 'List<dynamic>' can't be assigned to the parameter type 'List<Widget>'.

- 'List' is from 'dart:core'.

- 'Widget' is from 'package:flutter/src/widgets/framework.dart'

('/C:/fluttersdk/flutter/packages/flutter/lib/src/widgets/framework.dart').

children: scoreKeeper,

使用列表与我的行

创建列表

scoreKeeper变量的类型设置为List<Widget>而不是List

在main.dart中定义list为list scoreKeeper .

相关内容