flutter 2.5 更新后 listview 仅在移动平台上滚动。当我在网络上打开它时,它不会滚动。它在以前的版本中运行良好。我尝试了滚动物理,但它不起作用。你建议我做什么?对不起,我的英语不好。
return SizedBox(
height: 400,
child: ListView.builder(
physics: ClampingScrollPhysics(),
scrollDirection: Axis.horizontal,
// ignore: unnecessary_null_comparison
itemCount: items == null ? 0 : items.length,
itemBuilder: (context, index) {
return GestureDetector(
onTap: () {
LoginForm();
},
child: Container(
margin:
EdgeInsets.symmetric(horizontal: 20, vertical: 6),
child: SizedBox(
width: 400,
height: 50,
child: Stack(
fit: StackFit.expand,
children: <Widget>[
Container(
decoration: BoxDecoration(
borderRadius:
BorderRadius.all(Radius.circular(20.0)),
boxShadow: [
BoxShadow(
color: fromCssColor(
items[index].color.toString()),
// color: Colors.black38,
offset: Offset(2.0, 2.0),
blurRadius: 5.0,
spreadRadius: 1.0)
]),
),
ClipRRect( …Run Code Online (Sandbox Code Playgroud)