Cookie class

Represents a cookie object.

Constructors

Cookie({required String path, required num expires, required num size, required bool secure, required bool session, bool? partitionKeyOpaque, required String name, required String value, required String domain, bool? httpOnly, String? sameSite, String? priority, String? sourceScheme, CookiePartitionKeyOrString? partitionKey})
Cookie.fromJson(Map<String, dynamic> json)
factory

Properties

domain String
Cookie domain.
final
expires num
Cookie expiration date as the number of seconds since the UNIX epoch. Set to -1 for session cookies
final
hashCode int
The hash code for this object.
no setterinherited
httpOnly bool?
True if cookie is http-only.
final
name String
Cookie name.
final
partitionKey CookiePartitionKeyOrString?
Cookie partition key. In Chrome, it matches the top-level site the partitioned cookie is available in. In Firefox, it matches the source origin in the https://w3c.github.io/webdriver-bidi/#type-storage-PartitionKey PartitionKey.
final
partitionKeyOpaque bool?
True if cookie partition key is opaque. Supported only in Chrome.
final
path String
Cookie path.
final
priority String?
Cookie Priority. Supported only in Chrome.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
sameSite String?
Cookie SameSite type.
final
secure bool
True if cookie is secure.
final
session bool
True in case of session cookie.
final
size num
Cookie size.
final
sourceScheme String?
Cookie source scheme type. Supported only in Chrome.
final
value String
Cookie value.
final

Methods

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

Operators

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