canGoBackOrForward method
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 native WebView (Official API - WebView.canGoBackOrForward)
- iOS
- MacOS
- Windows
Implementation
@override
Future<bool> canGoBackOrForward({required int steps}) async {
Map<String, dynamic> args = <String, dynamic>{};
args.putIfAbsent('steps', () => steps);
return await channel?.invokeMethod<bool>('canGoBackOrForward', args) ??
false;
}