Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Programmatically Trigger Pull-To-Refresh #76

Open
RaiN3772 opened this issue Feb 20, 2024 · 0 comments
Open

Programmatically Trigger Pull-To-Refresh #76

RaiN3772 opened this issue Feb 20, 2024 · 0 comments

Comments

@RaiN3772
Copy link

Is your feature request related to a problem? Please describe.
Currently, the Liquid Pull To Refresh package only supports refresh triggered by user's pull-down gesture. This limitation becomes apparent in scenarios where an app might need to programmatically initiate the refresh process, similar to how one might want to trigger a refresh when a user navigates back to a page using the phone's back button. This limitation can be frustrating in user experiences that benefit from seamless refresh capabilities, such as in social media applications like Facebook, Instagram, and Reddit, where content freshness is crucial.

Describe the solution you'd like
I would like the package to include a feature that allows developers to programmatically trigger the pull-to-refresh action. This could be implemented as a method in the LiquidPullToRefresh widget's controller, which, when called, initiates the pull-to-refresh animation and the attached refresh callback programmatically. This method would enable developers to control the refresh behavior based on application logic, such as pressing the back button or other user actions that do not involve the pull-down gesture.

Describe alternatives you've considered
An alternative solution could be to manually trigger the refresh logic tied to the pull-to-refresh action, but this approach lacks the visual feedback and consistency provided by the pull-to-refresh animation. It also requires additional implementation effort to replicate the animation effects, making the overall solution less seamless and integrated.

Additional context
The ability to programmatically trigger pull-to-refresh actions would significantly enhance the flexibility and usability of the Liquid Pull To Refresh package. It aligns with user expectations set by major social media platforms and improves the user experience by ensuring that content can be refreshed in a way that is both intuitive and consistent with the rest of the application's design. Adding this feature would make the package more versatile and valuable to developers looking to implement sophisticated and user-friendly refresh behaviors in their Flutter applications.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant