LiteRepo class

Constructors

LiteRepo({required String collectionName, required Map<Type, ModelDecoderFunction> modelInitializer, String? encryptionPassword})

Properties

collectionName String
collectionName A unique name for this repository, used to identify the Hive box on disk.
final
encryptionPassword String?
final
hashCode int
The hash code for this object.
no setterinherited
isInitialized bool
no setter
modelInitializer Map<Type, ModelDecoderFunction>
modelInitializer Maps your type to a decode function. 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 persisted data. Non-primitive types stored as JSON strings are automatically revived to their original types.
getList<TGenericType>(String key) List<TGenericType>?
initialize() Future<bool>
Returns a Future that completes when the repository is ready to use.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
set<TType>(String key, TType? value) Future<void>
setList<TGenericType>(String key, List<TGenericType> values) Future<void>
toString() String
A string representation of this object.
inherited

Operators

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