SharedPreferenceRepository class
Implementation of Repository. Manages data inside a SharedPreference collection.
- Implemented types
Constructors
- Creates a new SharedPreferenceRepository.
Properties
Methods
-
clear(
{String? userId}) → Future< void> -
Deletes all the entries of the repository.
If
userIdis not null, the only enties that will be deleted will have the same user id.override -
count(
{String? userId, Where? where}) → Future< int> -
Returns the number of entries in the repository.
override
-
create(
{String? wantedId}) → Future< Model> -
Creates a new entry in the repository.
override
-
delete(
Model item) → Future< void> -
Deletes an entry in the repository.
override
-
deleteWhere(
Where where) → Future< void> -
Deletes all the entries that are compliant to the
whereclause.override -
get(
String id) → Future< Model> -
Returns the entry with the specified
id.override -
getAll(
{String? userId, Where? where, String? orderBy, bool descending = true}) → Future< List< Model> > -
Returns all the entries in the repository.
If
userIdis not null, the results will have the same user id. Ifwhereis not null, the results will be compliant to the where clause.override -
initialize(
) → Future< void> -
Initialize the repository.
override
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
-
update(
Model item) → Future< void> -
Updates an entry in the repository.
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited