class UserList extends StatelessWidget {
Widget build(BuildContext context) {
final但是,我得到了type 'List<Widget>' is not a subtype of type 'Widget'错误。在这种情况下,如何将List<Widget>类型转换为Widget类型?
我已经寻找了类似的答案,并尝试使用他们提出的解决方案,但没有成功。我正在尝试使用Firestore中的数据构建一个ListView。每次我尝试运行它,它都会给我一个“类型'List‘不是类型’Widget‘的子类型”的提示。 提前谢谢你!以下是错误中涉及的两个代码块: class Test extends StatelessWidget { Widget bui
我正在跟进的Google Codelabs我试着给出对象的类型。但它还是失败了。// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE fileimport 'package:<em
感觉我在做一些不同寻常的事情! 我在firebase firestore中的1个集合中有2个子集合(subColl1和subColl2)。padding: const EdgeInsets.all(8), children: <Widget但是像上面这样做(两者同时进行)会抛出一个错误type 'List<Widget>' is not a subtype of type