请稍等 ...
×

采纳答案成功!

向帮助你的同学说点啥吧!感谢那些助人为乐的人

RefreshIndicator 不显示

  Widget build(BuildContext context) {
    return Scaffold(
      backgroundColor: Color(0xf2f2f2),
      body: LoadingContainer(isLoading: _loading,
        child: Stack(children: [
        MediaQuery.removePadding(
          removeTop: true,
          context: context,
          child: RefreshIndicator(
            onRefresh: _handleRefresh,
            child: NotificationListener(
            onNotification: (scrollNotification) {
              if (scrollNotification is ScrollUpdateNotification && scrollNotification.depth == 0) {
                _onScroll(scrollNotification.metrics.pixels);
              }
              return true;
            },
            child: ListView(
              children: [
                Container(
                  height: 160,
                  child: Swiper(
                      itemCount: _imageUrls.length,
                      autoplay: true,
                      itemBuilder: (BuildContext context, int index) {
                        return Image.network(_imageUrls[index], fit: BoxFit.fill,);
                      },
                      pagination: SwiperPagination()
                  ),
                ),
                Padding(
                    padding: EdgeInsets.fromLTRB(7, 4, 7, 4),
                    child: LocalNav(localNavList: localNavList)
                ),
                if (gridNavModel != null)
                  Padding(
                    padding: EdgeInsets.fromLTRB(7, 0, 7, 4),
                    child: GridNav(gridNavModel: gridNavModel!),
                  ),
                Padding(
                    padding: EdgeInsets.fromLTRB(7, 0, 7, 4),
                    child: SubNav(subNavList: subNavList)
                ),
                if (salesBox != null)
                  Padding(
                    padding: EdgeInsets.fromLTRB(7, 0, 7, 4),
                    child: SalesBox(salesBox: salesBox!),
                  ),
              ],
            ),
          ),),
        ),
        Opacity(
          opacity: appBarAlpha,
          child: Container(
            height: 80,
            decoration: BoxDecoration(color: Colors.white),
            child: Center(
              child: Padding(
                padding: EdgeInsets.only(top: 20),
                child: Text('首页'),
              ),
            ),
          ),
        )
      ],),),
    );
  }

正在回答 回答被采纳积分+3

插入代码

1回答

CrazyCodeBoy 2023-08-16 22:24:47
安卓还是iOS是下拉不显示吗?
0 回复 有任何疑惑可以回复我~
  • 提问者 慕神8170126 #1
    都不显示
    回复 有任何疑惑可以回复我~ 2023-08-17 09:57:23
  • CrazyCodeBoy 回复 提问者 慕神8170126 #2
    对照下这块课程源码检查下你的代码实现看是否有出入的地方呢
    回复 有任何疑惑可以回复我~ 2023-08-18 08:25:07
问题已解决,确定采纳
还有疑问,暂不采纳
微信客服

购课补贴
联系客服咨询优惠详情

帮助反馈 APP下载

慕课网APP
您的移动学习伙伴

公众号

扫描二维码
关注慕课网微信公众号