beginRefreshing method

  1. @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')])
Future<void> beginRefreshing()

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:

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',
  );
}