LiteRepo class
Constructors
Properties
- collectionName → String
-
collectionName You must provide a unique name for this repository
this will be used to store your data in a Hive box
final
- encryptionPassword → String?
-
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- isInitialized → bool
-
no setter
-
modelInitializer
→ Map<
Type, ModelDecoderFunction> -
modelInitializer pass your type as a key to this map
and the method that will return a value of your type
converted from map.
IMPORTANT! Your type (the key) MUST implement LSJsonEncodable
example: { AuthData: AuthData.decode }
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
clear(
) → Future< int> -
get<
TType> (String key) → dynamic - Retrieves a persistent data stored in SharedPreferences You can use your own types here but in this case you need to add json encoders / revivers so that jsonEncode / jsonDecode could understand how to work with your type
-
getList<
TGenericType> (String key) → List< TGenericType> ? -
initialize(
) → Future< bool> - This is just a hack, to make it compatible with LiteState's inner storage but you can also use it to make sure the repository is initialized and can already be used to store values
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
set<
TType> (String key, TType? value) → Future -
setList<
TGenericType> (String key, List< TGenericType> values) → Future -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited