【发布时间】:2019-11-04 08:06:34
【问题描述】:
我是 Flutter 的新手。如何在 Row 中应用水平滚动视图。如果可行,请给我一个解决方案,然后我接受您的回答这里有人对此有解决方案吗?提前致谢。这是我的代码。
Row(
// crossAxisAlignment: CrossAxisAlignment.start,
children: categoryData.map((i) {
print('i====>>>>>>>>>>>>>>>>>.${i['name']}');
scrollDirection:
Axis.horizontal;
return FlatButton(
color: Colors.blue,
textColor: Colors.white,
disabledColor: Colors.grey,
disabledTextColor: Colors.black,
padding: EdgeInsets.all(8.0),
splashColor: Colors.blueAccent,
onPressed: () {
/*...*/
},
child: Text(
'${i['name']}',
style: TextStyle(fontSize: 12.0),
),
);
}).toList(),
),
【问题讨论】:
-
代码中的滚动视图在哪里?
-
如果您还没有添加滚动视图,请检查答案。