goBackOrForward method Null safety

Future<void> goBackOrForward(
  1. {required int steps}
)

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.

Official Android API: https://developer.android.com/reference/android/webkit/WebView#goBackOrForward(int)

Official iOS API: https://developer.apple.com/documentation/webkit/wkwebview/1414991-go

Implementation

Future<void> goBackOrForward({required int steps}) async {
  Map<String, dynamic> args = <String, dynamic>{};
  args.putIfAbsent('steps', () => steps);
  await _channel.invokeMethod('goBackOrForward', args);
}