Backpack class

Backpack class for storing data This class is not designed to store huge amounts of data.

Properties

hashCode → int
The hash code for this object.
no setterinherited
keys → List<String>
The keys currently stored in Backpack, including internal ones such as nylo and event_bus.
no setter
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

append(String key, dynamic value, {bool append = false, int? limit}) → void
Append a value to an existing key.
contains(String key) → bool
Checks if Backpack contains a key.
delete(String key) → void
Delete a value using a key.
deleteAll() → void
Delete all values from Backpack.
isNyloInitialized({String? key = "nylo"}) → bool
Check if the Backpack class contains an instance of Nylo.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
nylo({String key = 'nylo'}) → Nylo
Returns an instance of Nylo.
read<T>(String key, {dynamic defaultValue}) → T?
Read data from the Backpack with a key.
save(String key, dynamic value) → void
Set a value using a key and value.
sessionData(String name) → Map<String, dynamic>?
Get all session values.
sessionFlush(String name) → void
Flush a session using a name.
sessionGet<T>(String name, String key) → T?
Get a session value using a key.
sessionRemove(String name, String key) → void
Remove a session value using a key.
sessionUpdate(String name, String key, dynamic value) → void
Update the session with a key and value.
toString() → String
A string representation of this object.
inherited

Operators

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

Static Properties

instance ↔ Backpack
getter/setter pair