beginRefreshing method
- @SupportedPlatforms.new(platforms: [AndroidPlatform(apiName: 'SwipeRefreshLayout.setRefreshing', apiUrl: 'https://developer.android.com/reference/androidx/swiperefreshlayout/widget/SwipeRefreshLayout#setRefreshing(boolean)'), IOSPlatform(apiName: 'UIRefreshControl.beginRefreshing', apiUrl: 'https://developer.apple.com/documentation/uikit/uirefreshcontrol/1624842-beginrefreshing'), WindowsPlatform(apiName: 'Flutter pull-to-refresh indicator state')])
Tells the controller that a refresh operation was started programmatically.
Call this method when an external event source triggers a programmatic refresh of your scrolling view. This method updates the state of the refresh control to reflect the in-progress refresh operation. When the refresh operation ends, be sure to call the endRefreshing method to return the controller to its default state.
Officially Supported Platforms/Implementations:
- Android WebView (Official API - SwipeRefreshLayout.setRefreshing)
- iOS WKWebView (Official API - UIRefreshControl.beginRefreshing)
- Windows WebView2 (Official API - Flutter pull-to-refresh indicator state)
Use the PlatformPullToRefreshController.isMethodSupported method to check if this method is supported at runtime.
Implementation
@SupportedPlatforms(
platforms: [
AndroidPlatform(
apiName: 'SwipeRefreshLayout.setRefreshing',
apiUrl:
'https://developer.android.com/reference/androidx/swiperefreshlayout/widget/SwipeRefreshLayout#setRefreshing(boolean)',
),
IOSPlatform(
apiName: 'UIRefreshControl.beginRefreshing',
apiUrl:
'https://developer.apple.com/documentation/uikit/uirefreshcontrol/1624842-beginrefreshing',
),
WindowsPlatform(apiName: 'Flutter pull-to-refresh indicator state'),
],
)
Future<void> beginRefreshing() {
throw UnimplementedError(
'beginRefreshing is not implemented on the current platform',
);
}