相关疑难解决方法(0)

水平列表视图不在网页上滚动,但在移动设备上滚动

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)

listview scroll web flutter

45
推荐指数
2
解决办法
2万
查看次数

标签 统计

flutter ×1

listview ×1

scroll ×1

web ×1