aagarwal1012 / Liquid-Pull-To-Refresh

🔁 A custom refresh indicator for flutter.
https://pub.dev/packages/liquid_pull_to_refresh
MIT License
1.25k stars 92 forks source link

Refresh Controller? #11

Closed shoxter closed 5 years ago

shoxter commented 5 years ago

Is your feature request related to a problem? Please describe. I'm unable to initiate a refresh externally (like upon navigating into a route, by clicking a button, etc)

Describe the solution you'd like I would like for an optional "refresh controller" that allows for a refresh to be requested external to the LiquidPullToRefresh.

Describe alternatives you've considered Currently using SmartRefresher to accomplish this but like the looks of this one better.

Additional context

Taormina commented 5 years ago

https://github.com/aagarwal1012/Liquid-Pull-To-Refresh/blob/master/lib/liquid_pull_to_refresh.dart#L547 https://github.com/aagarwal1012/Liquid-Pull-To-Refresh/blob/master/example/lib/main.dart#L64

Check out the example here, I'm pretty sure you can use your GlobalKey<RefreshIndicatorState> to call the show() method.

shoxter commented 5 years ago

I'll check it out and report back! Thanks!

shoxter commented 5 years ago

It looks like this will work. Thanks!