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.89k stars 633 forks source link

下拉加载的时候拖拽会导致footer无法收起,并且一直停在成功的状态 #739

Open SeeYouWilsen opened 1 year ago

SeeYouWilsen commented 1 year ago
class  _MainPageState extends State<MainPage> {
  int count = 4;
  int maxCount = 30;

  final refreshController = EasyRefreshController(
      controlFinishLoad: true, controlFinishRefresh: true);

  @override
  void initState() {
    super.initState();
  }

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      body: EasyRefresh(
        controller:refreshController,
          onRefresh: () {
            refresh();
          },
          onLoad: () {
            loadMore();
          },
          child: ListView.separated(
            itemBuilder: (ctx, idx) {
              return SizedBox(
                height: 40,
                child: Center(
                  child: Text("第$idx个cell"),
                ),
              );
            },
            separatorBuilder: (ctx, idx) {
              return const Divider();
            },
            itemCount: count,
          )),
    );
  }

  refresh() {
    refreshController.resetFooter();
    count = 4;
    refreshController.finishRefresh();
    setState(() {

    });
  }

  loadMore() async{
    await Future.delayed(const Duration(seconds: 2));
    count += 10;
    final result =
        count >= maxCount ? IndicatorResult.noMore : IndicatorResult.success;
    refreshController.finishLoad(result);
    setState(() {

    });
  }
}
SeeYouWilsen commented 1 year ago

https://github.com/xuelongqy/flutter_easy_refresh/assets/17377866/014519e9-1997-4e8c-9f25-e64e5769529b

SeeYouWilsen commented 1 year ago

trim.C173A73B-0151-45A3-9F6C-4B0AC30F8C78.MOV

flutter : 3.7.9 easy_refresh: 3.3.2+1

mrqinshou commented 1 year ago

同问,我也出现了这个问题,加载更多后,掉用了_controller.finishLoad() footer没有自动收起

M0ql commented 1 year ago

同问,我也出现了这个问题,加载更多后,掉用了_controller.finishLoad() footer没有自动收起

同问

qiaodongliang commented 1 year ago

一样的问题

Dabbit-Chan commented 1 year ago

ClassicFooter中的infiniteOffset设置为null

Nicholas86 commented 12 months ago

ClassicFooter中的infiniteOffset设置为null

zyf540860996 commented 9 months ago

ClassicFooter中的infiniteOffset设置为null ,一样会悬停在底部,并没有收起 ,非常容易复现 flutter : 3.16.0 easy_refresh: 3.3.2+4

Nicholas86 commented 8 months ago

👍

------------------ 原始邮件 ------------------ 发件人: zyfken @.> 发送时间: 2024年1月11日 14:26 收件人: xuelongqy/flutter_easy_refresh @.> 抄送: Nicholas @.>, Comment @.> 主题: Re: [xuelongqy/flutter_easy_refresh] 下拉加载的时候拖拽会导致footer无法收起,并且一直停在成功的状态 (Issue #739)

ClassicFooter中的infiniteOffset设置为null ,一样会悬停在底部,并没有收起 ,非常容易复现 flutter : 3.16.0 easy_refresh: 3.3.2+4

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you commented.Message ID: @.***>

CatEatFishs commented 7 months ago

同样问题+1

jhembed commented 2 months ago

问题+1