The docs for RefreshIndicator suggest you can programmatically trigger the refresh behaviour via the RefreshIndicatorState class.
How do I access an instance of this class, assuming I've added a RefreshIndicator widget to my application? I can't see a property to access it and I'm assuming createState() is only used by the Flutter framework.
To avoid an XY problem, I should explain my reason for doing this is to perform a visually pleasing refresh of my list when my user first opens the app. The list will be empty initially and the refresh will poll my server for data.
See https://docs.flutter.io/flutter/material/RefreshIndicatorState/show.html and a usage example in the Flutter Gallery
Essentially
var indicator = new GlobalKey<RefreshIndicatorState>();
and then
indicator.currentState.show();
after it's built.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With