SessionStorage class

Browser sessionStorage wrapper for tab-scoped key/value data.

Inheritance

Constructors

SessionStorage()
Creates a sessionStorage wrapper.
const

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
storage → Storage
The browser sessionStorage object.
no setteroverride

Methods

clear() → void
Removes every value from this storage backend.
inherited
has(String key) bool
Whether key currently exists in storage.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
read(String key) String?
Reads a string value by key.
inherited
readJson(String key) Object?
Reads and decodes a JSON value by key.
inherited
readMap(String key) Map<String, dynamic>
Reads a JSON object by key, returning an empty map when absent.
inherited
remove(String key) String?
Removes key and returns the previous value when present.
inherited
toString() String
A string representation of this object.
inherited
write(String key, String value) → void
Writes a string value by key.
inherited
writeJson(String key, Object? value) → void
Encodes and writes value as JSON by key.
inherited

Operators

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