From b7cb2625b866c9d273f95d386c01c980a9af5910 Mon Sep 17 00:00:00 2001 From: Christian Uldall Pedersen Date: Wed, 10 Jul 2024 21:10:08 +0200 Subject: [PATCH] [webview_flutter_web] Add support for the credentialless attribute. (#151557) --- .../webview_flutter_web/example/lib/main.dart | 2 +- .../lib/src/web_webview_controller.dart | 25 +++++++++++++------ .../test/web_webview_controller_test.dart | 10 ++++++++ 3 files changed, 28 insertions(+), 9 deletions(-) diff --git a/packages/webview_flutter/webview_flutter_web/example/lib/main.dart b/packages/webview_flutter/webview_flutter_web/example/lib/main.dart index 9ce006031279..9686f8667c27 100644 --- a/packages/webview_flutter/webview_flutter_web/example/lib/main.dart +++ b/packages/webview_flutter/webview_flutter_web/example/lib/main.dart @@ -24,7 +24,7 @@ class _WebViewExample extends StatefulWidget { class _WebViewExampleState extends State<_WebViewExample> { final PlatformWebViewController _controller = PlatformWebViewController( - const PlatformWebViewControllerCreationParams(), + WebWebViewControllerCreationParams(), )..loadRequest( LoadRequestParams( uri: Uri.parse('https://flutter.dev'), diff --git a/packages/webview_flutter/webview_flutter_web/lib/src/web_webview_controller.dart b/packages/webview_flutter/webview_flutter_web/lib/src/web_webview_controller.dart index 2d8297fb5fd5..a5b2e7967adf 100644 --- a/packages/webview_flutter/webview_flutter_web/lib/src/web_webview_controller.dart +++ b/packages/webview_flutter/webview_flutter_web/lib/src/web_webview_controller.dart @@ -18,19 +18,32 @@ import 'http_request_factory.dart'; @immutable class WebWebViewControllerCreationParams extends PlatformWebViewControllerCreationParams { - /// Creates a new [AndroidWebViewControllerCreationParams] instance. + /// Creates a new [WebWebViewControllerCreationParams] instance. + /// [iFrameCredentialless] can be used to set the credentialless attribute on the