Storage extension type
The Storage
interface of the
Web Storage API
provides access to a particular domain's session or local storage. It
allows, for example, the addition, modification, or deletion of stored data
items.
To manipulate, for instance, the session storage for a domain, a call to Window.sessionStorage is made; whereas for local storage the call is made to Window.localStorage.
Properties
Methods
-
clear(
) → void -
The
clear()
method of the Storage interface clears all keys stored in a givenStorage
object. -
getItem(
String key) → String? -
The
getItem()
method of the Storage interface, when passed a key name, will return that key's value, ornull
if the key does not exist, in the givenStorage
object. -
key(
int index) → String? -
The
key()
method of the Storage interface, when passed a number n, returns the name of the nth key in a givenStorage
object. The order of keys is user-agent defined, so you should not rely on it. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
removeItem(
String key) → void -
The
removeItem()
method of the Storage interface, when passed a key name, will remove that key from the givenStorage
object if it exists. TheStorage
interface of the Web Storage API provides access to a particular domain's session or local storage. -
setItem(
String key, String value) → void -
The
setItem()
method of the Storage interface, when passed a key name and value, will add that key to the givenStorage
object, or update that key's value if it already exists. -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited