isEnabled method
- @SupportedPlatforms.new(platforms: [AndroidPlatform(apiName: 'View.isEnabled', apiUrl: 'https://developer.android.com/reference/android/view/View#isEnabled()'), 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')])
Returns true is pull-to-refresh feature is enabled, otherwise false.
Officially Supported Platforms/Implementations:
- Android WebView (Official API - View.isEnabled)
- iOS WKWebView (Official API - UIScrollView.refreshControl)
- Windows WebView2 (Official API - Flutter pointer events + WebView2 ExecuteScript)
Use the PlatformPullToRefreshController.isMethodSupported method to check if this method is supported at runtime.
Implementation
@SupportedPlatforms(
platforms: [
AndroidPlatform(
apiName: 'View.isEnabled',
apiUrl:
'https://developer.android.com/reference/android/view/View#isEnabled()',
),
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<bool> isEnabled() {
throw UnimplementedError(
'isEnabled is not implemented on the current platform',
);
}