WebviewCookie class

An HTTP cookie, as managed by the WebView2 cookie store.

Returned by WebviewController.getCookies and accepted by WebviewController.setCookie.

Constructors

WebviewCookie({required String name, required String value, String domain = '', String path = '/', DateTime? expires, bool isSecure = false, bool isHttpOnly = false, WebviewCookieSameSite sameSite = WebviewCookieSameSite.lax})
Creates a cookie. domain and path follow the browser defaults when omitted; omit expires for a session cookie.
const

Properties

domain → String
The host the cookie belongs to. An empty domain passed to WebviewController.setCookie scopes the cookie to the document's host.
final
expires → DateTime?
The expiration time, or null for a session cookie.
final
hashCode → int
The hash code for this object.
no setterinherited
isHttpOnly → bool
Whether the cookie is inaccessible to JavaScript.
final
isSecure → bool
Whether the cookie is only sent over HTTPS.
final
isSession → bool
Whether this is a session cookie (no expiration time).
no setter
name → String
The cookie name.
final
path → String
The URL path the cookie applies to.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
sameSite → WebviewCookieSameSite
The SameSite policy of the cookie.
final
value → String
The cookie value.
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited