CacheData<T> class

Constructors

CacheData()

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

fetchData({required String url, required Duration duration, Client? client}) Future<T?>
Fetch data from HiveDB with url as a key. If the database is empty, Sends an HTTP GET request to the given url then store the data in the HiveDB with duration as the age of the data.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

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

Static Methods

init([String? subDir]) Future<void>
Initialize Hive DB with the path from getApplicationDocumentsDirectory