VersionedContentController<T extends Versioned> class
abstract
- Inheritance
-
- Object
- StorageContentController<
T> - VersionedContentController
Constructors
- VersionedContentController(StorageDelegate delegate)
Properties
-
contents
→ Map<
String, T> -
Your stored/cached contents
no setterinherited
- hashCode → int
-
The hash code for this object.
no setterinherited
- isInit → bool
-
Is initialize
no setteroverride
- maxCount → int
-
Maximum storage/cache count
no setter
- maxDuration → Duration
-
Maximum storage/cache duration
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- saveKey → String
-
Used for shared_preferences key
no setterinherited
-
versions
↔ Map<
String, int> -
Content Versions
getter/setter pair
Methods
-
checkAndUpdate(
{String? identifier, bool updateVersions = true}) → Future< void> - Check and compare contents versions and update if necessary
-
contentGetter(
String identifier) → Future< T?> -
Content getter from your source (database)
inherited
-
fromJson(
Map< String, dynamic> map) → T -
Must implement fromJson
inherited
-
getContent(
String identifier) → Future< T?> -
Get content by identifier
inherited
-
init(
{bool? storeAllDocuments, bool clearAndReInit = false, String? initialIdentifier}) → Future< void> -
override
-
isThere(
String identifier) → bool -
Is content exists
inherited
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
remove(
String identifier) → Future< void> -
Remove content from storage/cache
inherited
-
save(
T content) → Future< void> -
Save content in storage/cache
inherited
-
toJson(
T instance) → Map< String, dynamic> -
Must implement fromJson
inherited
-
toString(
) → String -
A string representation of this object.
inherited
-
update(
String identifier, {bool checkAfterUpdate = true}) → Future< void> -
Update content from your source
inherited
-
versionGetter(
) → Future< Map< String, int> >
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited