goForward method
- @SupportedPlatforms.new(platforms: [AndroidPlatform(apiName: 'WebView.goForward', apiUrl: 'https://developer.android.com/reference/android/webkit/WebView#goForward()'), IOSPlatform(apiName: 'WKWebView.goForward', apiUrl: 'https://developer.apple.com/documentation/webkit/wkwebview/1414993-goforward'), MacOSPlatform(apiName: 'WKWebView.goForward', apiUrl: 'https://developer.apple.com/documentation/webkit/wkwebview/1414993-goforward'), WebPlatform(apiName: 'History.forward', apiUrl: 'https://developer.mozilla.org/en-US/docs/Web/API/History/forward'), WindowsPlatform(apiName: 'ICoreWebView2.GoForward', apiUrl: 'https://learn.microsoft.com/en-us/microsoft-edge/webview2/reference/win32/icorewebview2?view=webview2-1.0.2210.55#goforward'), LinuxPlatform(apiName: 'webkit_web_view_go_forward', apiUrl: 'https://wpewebkit.org/reference/stable/wpe-webkit-2.0/method.WebView.go_forward.html')])
Goes forward in the history of the WebView.
Officially Supported Platforms/Implementations:
- Android WebView (Official API - WebView.goForward)
- iOS WKWebView (Official API - WKWebView.goForward)
- macOS WKWebView (Official API - WKWebView.goForward)
- Web <iframe> but requires same origin (Official API - History.forward)
- Windows WebView2 (Official API - ICoreWebView2.GoForward)
- Linux WPE WebKit (Official API - webkit_web_view_go_forward)
Use the PlatformInAppWebViewController.isMethodSupported method to check if this method is supported at runtime.
Implementation
@SupportedPlatforms(
platforms: [
AndroidPlatform(
apiName: 'WebView.goForward',
apiUrl:
'https://developer.android.com/reference/android/webkit/WebView#goForward()',
),
IOSPlatform(
apiName: 'WKWebView.goForward',
apiUrl:
'https://developer.apple.com/documentation/webkit/wkwebview/1414993-goforward',
),
MacOSPlatform(
apiName: 'WKWebView.goForward',
apiUrl:
'https://developer.apple.com/documentation/webkit/wkwebview/1414993-goforward',
),
WebPlatform(
apiName: 'History.forward',
apiUrl:
'https://developer.mozilla.org/en-US/docs/Web/API/History/forward',
),
WindowsPlatform(
apiName: 'ICoreWebView2.GoForward',
apiUrl:
'https://learn.microsoft.com/en-us/microsoft-edge/webview2/reference/win32/icorewebview2?view=webview2-1.0.2210.55#goforward',
),
LinuxPlatform(
apiName: 'webkit_web_view_go_forward',
apiUrl:
'https://wpewebkit.org/reference/stable/wpe-webkit-2.0/method.WebView.go_forward.html',
),
],
)
Future<void> goForward() {
throw UnimplementedError(
'${PlatformInAppWebViewControllerMethod.goForward.name} is not implemented on the current platform',
);
}