setSettings method

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

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

Officially Supported Platforms/Implementations:

  • Android native WebView
  • iOS
  • MacOS

Implementation

@override
Future<void> setSettings(
    {required InAppBrowserClassSettings settings}) async {
  assert(_isOpened, 'The browser is not opened.');

  Map<String, dynamic> args = <String, dynamic>{};
  args.putIfAbsent('settings', () => settings.toMap());
  await channel?.invokeMethod('setSettings', args);
}