CacheData<T > class
Properties
hashCode
→ int
The hash code for this object.
no setter inherited
runtimeType
→ Type
A representation of the runtime type of the object.
no setter inherited
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
Static Methods
init ([String ? subDir ])
→ Future <void >
Initialize Hive DB with the path from getApplicationDocumentsDirectory