Skip to content

Commit 29c8059

Browse files
committed
[webview_flutter] Update some comments to be more explicit
1 parent a3ffce3 commit 29c8059

3 files changed

Lines changed: 16 additions & 7 deletions

File tree

packages/webview_flutter/webview_flutter/lib/src/webview_cookie_manager.dart

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -87,10 +87,14 @@ class WebViewCookieManager {
8787
/// This is a no op on iOS versions below 11.
8888
Future<void> setCookie(WebViewCookie cookie) => platform.setCookie(cookie);
8989

90-
/// Gets a list of existing cookie for all or specified domain for all WebViews.
90+
/// Gets a list of existing cookie for specified domain from all
91+
/// WebView instances of the application.
9192
///
92-
/// Android: Entire domain must be provided alongside scheme
93-
/// iOS & macOS: ignores scheme and supports partial match based on host
93+
/// On iOS & macOS if domain is not provided then it returns all cookies.
94+
///
95+
/// Android: Entire domain must be provided alongside scheme.
96+
///
97+
/// iOS & macOS: ignores scheme and uses partial match based on host.
9498
Future<List<WebViewCookie>> getCookies({Uri? domain}) =>
9599
platform.getCookies(domain);
96100
}

packages/webview_flutter/webview_flutter_platform_interface/lib/src/platform_webview_cookie_manager.dart

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -65,9 +65,14 @@ abstract class PlatformWebViewCookieManager extends PlatformInterface {
6565
);
6666
}
6767

68-
/// Gets a list of existing cookie for all or specified domain for all WebViews.
69-
/// Android: Entire domain must be provided alongside scheme
70-
/// iOS: ignores scheme and supports partial match based on host
68+
/// Gets a list of existing cookie for specified domain from all
69+
/// WebView instances of the application.
70+
///
71+
/// On iOS & macOS if domain is not provided then it returns all cookies.
72+
///
73+
/// Android: Entire domain must be provided alongside scheme.
74+
///
75+
/// iOS & macOS: ignores scheme and uses partial match based on host.
7176
Future<List<WebViewCookie>> getCookies(Uri? domain) {
7277
throw UnimplementedError(
7378
'getCookie is not implemented on the current platform',

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,6 @@ class WebViewCookie {
4141

4242
@override
4343
String toString() {
44-
return 'WebViewCookie{name: $name, domain: $domain, path: $path}';
44+
return 'WebViewCookie{name: $name, value: $value, domain: $domain, path: $path}';
4545
}
4646
}

0 commit comments

Comments
 (0)