Reputation: 6631
Is there any way to achieve this behavior?
Currently when I use the addPostFrameacallback to force the state to show the indicator, it launch the onRefresh function.
Upvotes: 0
Views: 1142
Reputation: 153
To show the RefreshIndicator manually, just attach the RefreshIndicator()
to a GlobalKey<RefreshIndicatorState>
by adding the previously created GlobalKey<RefreshIndicatorState>
to the key:
property of the RefreshIndicator()
, and trigger it anytime by running _refreshKey.currentState.show();
.
Upvotes: 2
Reputation: 559
If you want to use the indicator as a loading icon, can't you instead use CircularProgressIndicator and animate it to act the same way?
Upvotes: 0