HiveCookieStorage class

A cookie storage implementation using Hive with optional encryption support. This storage is used by the CookieJar to store cookies.

Constructors

HiveCookieStorage({String? boxName, HiveCipher? encryptionCipher})
Initialize the cookie storage with an optional encryptionCipher.
HiveCookieStorage.migrateFromFileStorage({required String? fileStorageDir, String? boxName, HiveCipher? encryptionCipher})
If you were using FileStorage before, you can migrate to HiveCookieStorage by providing the fileStorageDir where the cookies are stored in the FileStorage.

Properties

boxName String?
Optional box name for the Hive box.
getter/setter pair
encryptionCipher → HiveCipher?
Optional encryption cipher to use with Hive.
final
fileStorageDir String?
If fileStorageDir is provided, the cookie storage will be migrated from the FileStorage to HiveCookieStorage.
final
hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

delete(String key) Future<void>
Delete the cookie value with the given key in the storage.
deleteAll(List<String> keys) Future<void>
Delete all cookies in the storage (regardless the keys).
init(bool persistSession, bool ignoreExpires) Future<void>
Initialization for the Storage, e.g. prepare storage paths.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
read(String key) Future<String?>
Read cookie string from the given key in the storage.
toString() String
A string representation of this object.
inherited
write(String key, String value) Future<void>
Write cookie value with the given key to the storage.

Operators

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