ModelStorage<T extends EngineModel> class Null safety

Storage for EngineModel instances

Inheritance
Implementers

Constructors

ModelStorage({required String key, required T fromJson(Json)})

Properties

fromJson → T Function(Json)
Factory function to build object from json
final
hashCode int
The hash code for this object. [...]
read-only, inherited
key String
The key to store all values mapped to
final, inherited
ready Future<bool>
Is the storage ready
read-only, inherited
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited
storage KeyValueStorage
Key value storage instance for this instance
final, inherited

Methods

get() Future<Map<String, dynamic>?>
Get the value from storage
inherited
getItem() Future<T?>
Gets the object instance for saved data
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed. [...]
inherited
remove() Future<void>
Remove the value from storage
inherited
set(Json value) Future<void>
Add a value pair to storage
inherited
setItem(T item) Future<void>
Sets a model item in storage
toString() String
A string representation of this object. [...]
inherited

Operators

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