setSettings method

  1. @override
Future<void> setSettings({
  1. required InAppWebViewSettings settings,
})

Sets the WebView settings with the new settings and evaluates them.

Officially Supported Platforms/Implementations:

  • Android native WebView
  • iOS
  • MacOS
  • Web

Implementation

@override
Future<void> setSettings({required InAppWebViewSettings settings}) async {
  Map<String, dynamic> args = <String, dynamic>{};

  args.putIfAbsent('settings', () => settings.toMap());
  await channel?.invokeMethod('setSettings', args);
}