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

Refresh finishes automatically when `controlFinishRefresh` is set to `true` #668

Closed biklas7 closed 1 year ago

biklas7 commented 1 year ago

Basically, I was expecting that setting controlFinishRefresh: true would allow me to say when I want the refresh to finish by calling finishRefresh(), but the refresh is ending (at least the refresh indicator is disappearing) even when I don't call finishRefresh().

This seems to happen at random, at least I couldn't figure out why, but I'm pretty sure it's an issue with this package because if I show the loading indicator myself (using a custom widget in a stack for example) when I update the loading state it works as expected. So I think there's some place within this package that is changing the indicator state and not respecting the flag controlFinishRefresh.

Sorry, I don't have reproducible code to share because this is happening at random and I couldn't figure out why yet 🙏

I wish I was more helpful, but I'm hoping that someone more knowledgable about easy_refresh code might know why this happens 🤞

xuelongqy commented 1 year ago

I didn't encounter this issue on my end. I need to confirm one thing, have you modified controlFinishRefresh during usage? If you have code that can reproduce the issue, please let me know anytime.

biklas7 commented 1 year ago

Hey, eventually the issue went away and everything is fine now, not sure how or why because it was super random. Probably I had something wrong on my side but not entirely sure, so keep your eyes open for it because it could also be some pesty bug hiding somewhere 😄 Answering your questions: no I didn't modify controlFinishRefresh during usage, it was set to true at all times and I'm sorry but I don't have code that can reproduce right now 🙏

I wish I were more helpful but in the end, the issue does not happen anymore so that's that 👍

Thanks for this fantastic package btw 👍