diff --git a/lib/src/in_app_webview/in_app_webview_controller.dart b/lib/src/in_app_webview/in_app_webview_controller.dart index 33dd0bb2..b68b9445 100644 --- a/lib/src/in_app_webview/in_app_webview_controller.dart +++ b/lib/src/in_app_webview/in_app_webview_controller.dart @@ -1847,19 +1847,16 @@ class InAppWebViewController ///Use [setSettings] instead. @Deprecated('Use setSettings instead') Future setOptions({required InAppWebViewGroupOptions options}) async { - Map args = {}; - - args.putIfAbsent('settings', () => options.toMap()); - await _channel.invokeMethod('setSettings', args); + InAppWebViewSettings settings = InAppWebViewSettings.fromMap(options.toMap()); + await setSettings(settings: settings); } ///Use [getSettings] instead. @Deprecated('Use getSettings instead') Future getOptions() async { - Map args = {}; + InAppWebViewSettings? settings = await getSettings(); - Map? options = - await _channel.invokeMethod('getSettings', args); + Map? options = settings?.toMap(); if (options != null) { options = options.cast(); return InAppWebViewGroupOptions.fromMap(options as Map);