Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 2.6.1

* Adds support for the `allowsLinkPreview` property on iOS.

## 2.6.0

* Adds support to register a callback to intercept messages that are written to
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ class WebSettings {
this.hasProgressTracking,
this.debuggingEnabled,
this.gestureNavigationEnabled,
this.allowsLinkPreview,
this.allowsInlineMediaPlayback,
this.zoomEnabled,
required this.userAgent,
Expand Down Expand Up @@ -125,8 +126,13 @@ class WebSettings {
/// See also: [WebView.gestureNavigationEnabled]
final bool? gestureNavigationEnabled;

/// Determines whether pressing a link displays a preview of the destination for the link in iOS.
///
/// See also: [WebView.allowsLinkPreview]
final bool? allowsLinkPreview;

@override
String toString() {
return 'WebSettings(javascriptMode: $javascriptMode, hasNavigationDelegate: $hasNavigationDelegate, hasProgressTracking: $hasProgressTracking, debuggingEnabled: $debuggingEnabled, gestureNavigationEnabled: $gestureNavigationEnabled, userAgent: $userAgent, allowsInlineMediaPlayback: $allowsInlineMediaPlayback)';
return 'WebSettings(javascriptMode: $javascriptMode, hasNavigationDelegate: $hasNavigationDelegate, hasProgressTracking: $hasProgressTracking, debuggingEnabled: $debuggingEnabled, gestureNavigationEnabled: $gestureNavigationEnabled, allowsLinkPreview: $allowsLinkPreview, userAgent: $userAgent, allowsInlineMediaPlayback: $allowsInlineMediaPlayback)';
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -261,6 +261,11 @@ abstract class PlatformWebViewController extends PlatformInterface {
'setUserAgent is not implemented on the current platform');
}

/// Whether to display a preview of the destination for the link
///
/// This is not supported by all platforms, so it defaults to a noop
Future<void> setAllowsLinkPreview(bool allow) async {}

/// Sets a callback that notifies the host application that web content is
/// requesting permission to access the specified resources.
Future<void> setOnPlatformPermissionRequest(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ repository: https://github.com/flutter/packages/tree/main/packages/webview_flutt
issue_tracker: https://github.com/flutter/flutter/issues?q=is%3Aissue+is%3Aopen+label%3A%22p%3A+webview_flutter%22
# NOTE: We strongly prefer non-breaking changes, even at the expense of a
# less-clean API. See https://flutter.dev/go/platform-interface-breaking-changes
version: 2.6.0
version: 2.6.1

environment:
sdk: ">=2.19.0 <4.0.0"
Expand Down