【问题标题】:children and padding isnt defined in listView flutterlistView 颤动中未定义子项和填充
【发布时间】:2022-01-03 23:54:35
【问题描述】:

[listView flutter 中没有定义子元素和填充]

返回列表视图( 填充:const EdgeInsets.all(8),

孩子们:[ 容器( 身高:50, 颜色:Colors.amber[600], 孩子:常量中心(孩子:文本('条目A')), ), 容器( 身高:50, 颜色:Colors.amber[500], child: const Center(child: Text('Entry B')), ), 容器( 身高:50, 颜色:Colors.amber[100], 孩子:常量中心(孩子:文本('Entry C')), ), ], );

【问题讨论】:

  • 这个回报在哪里? void buld(上下文)?
  • 我复制了你的代码,它运行良好。您是否在无状态/有状态小部件的构建上下文中使用列表视图?
  • 问题是我的班级名称是 ListView,当我更改名称时它可以正常工作

标签: android ios flutter android-studio


【解决方案1】:

问题是我的班级名称是 ListView,当我更改名称时它可以正常工作。

我们必须选择与飞镖颤振类不同的名称

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2019-01-15
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2014-07-05
    • 1970-01-01
    相关资源
    最近更新 更多