getCopyBackForwardList method
- @SupportedPlatforms.new(platforms: [AndroidPlatform(apiName: 'WebView.copyBackForwardList', apiUrl: 'https://developer.android.com/reference/android/webkit/WebView#copyBackForwardList()'), IOSPlatform(apiName: 'WKWebView.backForwardList', apiUrl: 'https://developer.apple.com/documentation/webkit/wkwebview/1414977-backforwardlist'), MacOSPlatform(apiName: 'WKWebView.backForwardList', apiUrl: 'https://developer.apple.com/documentation/webkit/wkwebview/1414977-backforwardlist'), WindowsPlatform(), LinuxPlatform()])
Gets the WebHistory for this WebView. This contains the back/forward list for use in querying each item in the history stack. This contains only a snapshot of the current state. Multiple calls to this method may return different objects. The object returned from this method will not be updated to reflect any new state.
Officially Supported Platforms/Implementations:
- Android WebView (Official API - WebView.copyBackForwardList)
- iOS WKWebView (Official API - WKWebView.backForwardList)
- macOS WKWebView (Official API - WKWebView.backForwardList)
- Windows WebView2
- Linux WPE WebKit
Use the PlatformInAppWebViewController.isMethodSupported method to check if this method is supported at runtime.
Implementation
@SupportedPlatforms(
platforms: [
AndroidPlatform(
apiName: 'WebView.copyBackForwardList',
apiUrl:
'https://developer.android.com/reference/android/webkit/WebView#copyBackForwardList()',
),
IOSPlatform(
apiName: 'WKWebView.backForwardList',
apiUrl:
'https://developer.apple.com/documentation/webkit/wkwebview/1414977-backforwardlist',
),
MacOSPlatform(
apiName: 'WKWebView.backForwardList',
apiUrl:
'https://developer.apple.com/documentation/webkit/wkwebview/1414977-backforwardlist',
),
WindowsPlatform(),
LinuxPlatform(),
],
)
Future<WebHistory?> getCopyBackForwardList() {
throw UnimplementedError(
'${PlatformInAppWebViewControllerMethod.getCopyBackForwardList.name} is not implemented on the current platform',
);
}