Skip to content

Commit a4907b5

Browse files
[webview_flutter_platform_interface] Adds url to WebResourceError (#4439)
Platform interface portion of #3884
1 parent aa1eace commit a4907b5

File tree

3 files changed

+9
-1
lines changed

3 files changed

+9
-1
lines changed

packages/webview_flutter/webview_flutter_platform_interface/CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
## 2.4.0
2+
3+
* Adds support to retrieve the url from a web resource loading error. See `WebResourceError.url`.
4+
15
## 2.3.1
26

37
* Removes obsolete null checks on non-nullable values.

packages/webview_flutter/webview_flutter_platform_interface/lib/src/types/web_resource_error.dart

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,7 @@ class WebResourceError {
107107
required this.description,
108108
this.errorType,
109109
this.isForMainFrame,
110+
this.url,
110111
});
111112

112113
/// Raw code of the error from the respective platform.
@@ -120,4 +121,7 @@ class WebResourceError {
120121

121122
/// Whether the error originated from the main frame.
122123
final bool? isForMainFrame;
124+
125+
/// The URL for which the failing resource request was made.
126+
final String? url;
123127
}

packages/webview_flutter/webview_flutter_platform_interface/pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ repository: https://github.com/flutter/packages/tree/main/packages/webview_flutt
44
issue_tracker: https://github.com/flutter/flutter/issues?q=is%3Aissue+is%3Aopen+label%3A%22p%3A+webview_flutter%22
55
# NOTE: We strongly prefer non-breaking changes, even at the expense of a
66
# less-clean API. See https://flutter.dev/go/platform-interface-breaking-changes
7-
version: 2.3.1
7+
version: 2.4.0
88

99
environment:
1010
sdk: ">=2.18.0 <4.0.0"

0 commit comments

Comments
 (0)