WebStorageType class

Class that represents the type of Web Storage: localStorage or sessionStorage. Used by the PlatformStorage class.

Properties

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

Methods

isSupported() → bool
Checks if the value is supported by the defaultTargetPlatform.
name() → String
Gets the name of the value.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toNativeValue() → String?
Gets String native value if supported by the current platform, otherwise null.
toString() → String
A string representation of this object.
override
toValue() → String
Gets String value.

Operators

operator ==(Object value) → bool
The equality operator.
override

Static Properties

values → Set<WebStorageType>
Set of all values of WebStorageType.
final

Static Methods

asNameMap() → Map<String, WebStorageType>
Creates a map from the names of WebStorageType values to the values.
byName(String? name) → WebStorageType?
Gets a possible WebStorageType instance value with name name.
fromNativeValue(String? value) → WebStorageType?
Gets a possible WebStorageType instance from a native value.
fromValue(String? value) → WebStorageType?
Gets a possible WebStorageType instance from String value.

Constants

LOCAL_STORAGE → const WebStorageType
window.localStorage: same as SESSION_STORAGE, but persists even when the browser is closed and reopened.
SESSION_STORAGE → const WebStorageType
window.sessionStorage: maintains a separate storage area for each given origin that's available for the duration of the page session (as long as the browser is open, including page reloads and restores).