canGoBackOrForward method
- @SupportedPlatforms.new(platforms: [AndroidPlatform(apiName: 'WebView.canGoBackOrForward', apiUrl: 'https://developer.android.com/reference/android/webkit/WebView#canGoBackOrForward(int)'), IOSPlatform(), MacOSPlatform(), LinuxPlatform(), WindowsPlatform()])
- required int steps,
Returns a boolean value indicating whether the WebView can go back or forward the given number of steps.
Steps is negative if backward and positive if forward.
Officially Supported Platforms/Implementations:
- Android WebView (Official API - WebView.canGoBackOrForward)
- iOS WKWebView
- macOS WKWebView
- Linux WPE WebKit
- Windows WebView2
Parameters - Officially Supported Platforms/Implementations:
steps: all platforms
Use the PlatformInAppWebViewController.isMethodSupported method to check if this method is supported at runtime.
Implementation
@SupportedPlatforms(
platforms: [
AndroidPlatform(
apiName: 'WebView.canGoBackOrForward',
apiUrl:
'https://developer.android.com/reference/android/webkit/WebView#canGoBackOrForward(int)',
),
IOSPlatform(),
MacOSPlatform(),
LinuxPlatform(),
WindowsPlatform(),
],
)
Future<bool> canGoBackOrForward({required int steps}) {
throw UnimplementedError(
'${PlatformInAppWebViewControllerMethod.canGoBackOrForward.name} is not implemented on the current platform',
);
}