xuelongqy / flutter_easy_refresh

A flutter widget that provides pull-down refresh and pull-up load.
https://xuelongqy.github.io/flutter_easy_refresh/
MIT License
3.92k stars 636 forks source link

自定义Footer,NoMore时,盖在列表上了 #868

Open onism0106 opened 2 weeks ago

onism0106 commented 2 weeks ago

自定义的Footer代码如下:

footer: BuilderFooter(
            triggerOffset: 70,
            clamping: false,
            position: IndicatorPosition.above,
            processedDuration: Duration.zero,
            builder: (context, state) {
              if (state.mode == IndicatorMode.processing) {
                return Padding(
                  padding: const EdgeInsets.only(
                    top: 12.0,
                    bottom: 12.0,
                  ),
                  child: Row(
                    mainAxisAlignment: MainAxisAlignment.center,
                    children: [
                      ExtendedImage(
                        width: 12.0,
                        height: 12.0,
                        clearMemoryCacheWhenDispose: true,
                        image: AssetImage(
                          GetExt.isDarkMode
                              ? 'res/images/dark/icon_load_more.png'
                              : 'res/images/icon_load_more.png',
                          package: 'flutter_template_sdk',
                        ),
                      ),
                      Container(
                        margin: const EdgeInsets.only(left: 8.0),
                        child: Text(
                          '正在加载',
                          style: TextStyle(
                            fontSize: 13.0,
                            color: Theme.of(context)
                                .extension<FlutterTemplateSdkColors>()!
                                .clTextLevel3,
                          ),
                        ),
                      ),
                    ],
                  ),
                );
              }
              if (state.result == IndicatorResult.noMore) {
                return Text('没有更多数据了');
              }
              return SizedBox.shrink();
            },
          ),

当列表没有更多内容时,显示了noMore的Footer,但是列表再向上滑时,Footer不动了,盖在了列表上 是哪里出问题了嘛?

wangbf11 commented 1 week ago

我也遇见同样的问题 tabview和这个下拉刷新组件 一起用的时候必定出现