updateSettings method

  1. @override
Future<void> updateSettings(
  1. WebSettings setting
)

Updates the webview settings.

Any non null field in settings will be set as the new setting value. All null fields in settings are ignored.

Implementation

@override
Future<void> updateSettings(WebSettings setting) async {
  await Future.wait(<Future<void>>[
    _setUserAgent(setting.userAgent),
    if (setting.hasProgressTracking != null)
      _setHasProgressTracking(setting.hasProgressTracking!),
    if (setting.hasNavigationDelegate != null)
      _setHasNavigationDelegate(setting.hasNavigationDelegate!),
    if (setting.javascriptMode != null)
      _setJavaScriptMode(setting.javascriptMode!),
    if (setting.debuggingEnabled != null)
      _setDebuggingEnabled(setting.debuggingEnabled!),
    if (setting.zoomEnabled != null) _setZoomEnabled(setting.zoomEnabled!),
  ]);
}