goBackOrForward method
Goes to the history item that is the number of steps away from the current item. Steps is negative if backward and positive if forward.
NOTE for Web: this method will have effect only if the iframe has the same origin.
Officially Supported Platforms/Implementations:
- Android native WebView (Official API - WebView.goBackOrForward)
- iOS (Official API - WKWebView.go)
- MacOS (Official API - WKWebView.go)
- Web (Official API - History.go)
- Windows
Implementation
@override
Future<void> goBackOrForward({required int steps}) async {
Map<String, dynamic> args = <String, dynamic>{};
args.putIfAbsent('steps', () => steps);
await channel?.invokeMethod('goBackOrForward', args);
}