Storage class

This Web Storage API interface provides access to a particular domain's session or local storage. It allows, for example, the addition, modification, or deletion of stored data items.

Available extensions
Annotations
  • @JS()
  • @staticInterop

Constructors

Storage()
factory

Properties

clear ↔ void Function()

Available on Storage, provided by the Storage$Typings extension

getter/setter pair
getItem String? Function(String)

Available on Storage, provided by the Storage$Typings extension

getter/setter pair
hashCode int
The hash code for this object.
no setterinherited
key String? Function(num)

Available on Storage, provided by the Storage$Typings extension

getter/setter pair
length num

Available on Storage, provided by the Storage$Typings extension

Returns the number of key/value pairs currently present in the list associated with the object.
no setter
removeItem ↔ void Function(String)

Available on Storage, provided by the Storage$Typings extension

getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
setItem ↔ void Function(String, String)

Available on Storage, provided by the Storage$Typings extension

getter/setter pair

Methods

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

Operators

operator ==(Object other) bool
The equality operator.
inherited
operator [](String index) → dynamic

Available on Storage, provided by the Storage$Typings extension

operator []=(String index, dynamic value) → void

Available on Storage, provided by the Storage$Typings extension