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 3c44e53d..a04ee52d 100644 --- a/lib/src/in_app_webview/in_app_webview_controller.dart +++ b/lib/src/in_app_webview/in_app_webview_controller.dart @@ -1864,19 +1864,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);