EventCache class

Constructors

EventCache({Duration writeToDiskInterval = const Duration(minutes: 5)})

Properties

diskCache DiskCache
final
events List<AppFitEvent>
The entries in the cache.
no setter
hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

add(AppFitEvent event) → void
Adds the provided value to the cache. This is used to add events to the cache that have not been posted to the network. This will do a lookup in the cache to find the event that matches the provided value and if it is found, it will remove the old event and add the new one.
clear() → void
Clears the cache. This will remove all of the local cached events.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
remove(String id) → void
Removes the event with the provided id from the cache. This is used to remove events that have been successfully posted to the network. This will do a lookup in the cache to find the event that matches the provided id.
removeBy(AppFitEvent event) → void
Removes the event with the provided event from the cache. This is used to remove events that have been successfully posted to the network. This will do a lookup in the cache to find the event that matches the provided event.
toString() String
A string representation of this object.
inherited

Operators

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