setEnabled method

  1. @SupportedPlatforms.new(platforms: [AndroidPlatform(apiName: 'SwipeRefreshLayout.setEnabled', apiUrl: 'https://developer.android.com/reference/androidx/swiperefreshlayout/widget/SwipeRefreshLayout#setEnabled(boolean)'), IOSPlatform(apiName: 'UIScrollView.refreshControl', apiUrl: 'https://developer.apple.com/documentation/uikit/uiscrollview/2127691-refreshcontrol'), WindowsPlatform(apiName: 'Flutter pointer events + WebView2 ExecuteScript', apiUrl: 'https://learn.microsoft.com/en-us/microsoft-edge/webview2/reference/win32/icorewebview2#execute-script')])
Future<void> setEnabled(
  1. bool enabled
)

Sets whether the pull-to-refresh feature is enabled or not.

Officially Supported Platforms/Implementations:

Parameters - Officially Supported Platforms/Implementations:

  • enabled: all platforms

Use the PlatformPullToRefreshController.isMethodSupported method to check if this method is supported at runtime.

Implementation

@SupportedPlatforms(
  platforms: [
    AndroidPlatform(
      apiName: 'SwipeRefreshLayout.setEnabled',
      apiUrl:
          'https://developer.android.com/reference/androidx/swiperefreshlayout/widget/SwipeRefreshLayout#setEnabled(boolean)',
    ),
    IOSPlatform(
      apiName: 'UIScrollView.refreshControl',
      apiUrl:
          'https://developer.apple.com/documentation/uikit/uiscrollview/2127691-refreshcontrol',
    ),
    WindowsPlatform(
      apiName: 'Flutter pointer events + WebView2 ExecuteScript',
      apiUrl:
          'https://learn.microsoft.com/en-us/microsoft-edge/webview2/reference/win32/icorewebview2#execute-script',
    ),
  ],
)
Future<void> setEnabled(bool enabled) {
  throw UnimplementedError(
    'setEnabled is not implemented on the current platform',
  );
}