ClientCookie class Null safety

Client cookie

Constructors

ClientCookie(String name, String value, DateTime createdAt, {String? domain, DateTime? expires, bool httpOnly = false, int? maxAge, bool secure = false, String? path})
ClientCookie.fromMap(String name, String value, DateTime createdAt, Map map)
Receives directives as Map
factory
ClientCookie.fromSetCookie(String cookieItem)
Parses one 'set-cookie' item
factory

Properties

createdAt DateTime
TIme at which cookie was created
final
domain String?
Cookie domain
final
expires DateTime?
Cookie expiry date
final
hasExpired bool
Returns true if the cookie has expired
read-only
hashCode int
The hash code for this object.
read-onlyinherited
httpOnly bool
Is cookie HTTP only?
final
maxAge int?
Max age of cookie
final
name String
Cookie name
final
path String?
Cookie path
final
runtimeType Type
A representation of the runtime type of the object.
read-onlyinherited
secure bool
Should the cookie be only sent on secure requests?
final
setCookie String
Returns a String representation that can be directly written to 'set-cookie' header of server response
read-only
toReqHeader String
Returns a String representation that can be written directly to http.Request 'cookie' header
read-only
value String
Value of cookie
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed.
inherited
toString() String
String representation that is useful for debug printing
override

Operators

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

Static Methods

toSetCookie(Iterable<ClientCookie> cookies) String
Returns a String representation that can be directly written to 'set-cookie' header