GlobalKey<RefreshIndicatorState> _indicatorKey =
GlobalKey<RefreshIndicatorState>();
body: RefreshIndicator(
key: _indicatorKey,
onRefresh: () async {
try {
await _viewModel.loadNewData();
} catch (e) {
showErrorHint(context, e);
throw (e);
}
},
_refresh() {
_indicatorKey.currentState.show();
}
网友评论