Http class Providers

Make http requests, and cache them in hiveBox (hiveHttpCache)].

Require hiveBox(hiveHttpCache) to be awaited before start of app!

Read hive on init, state is a List from json http.Response , save state to Hive.

Inheritance
Annotations

Constructors

Http()

Properties

apiKey String
latefinalinherited
hashCode int
The hash code for this object.
read-onlyinherited
headers Map<String, String>
read-only
path String
latefinalinherited
ref NotifierProviderRef<List<Map<String, dynamic>>>
The Ref from the provider associated with this Notifier.
read-onlyinherited
runtimeType Type
A representation of the runtime type of the object.
read-onlyinherited
state List<Map<String, dynamic>>
The value currently exposed by this Notifier.
read / writeinherited
stateOrNull List<Map<String, dynamic>>?
The value currently exposed by this Notifier.
read-onlyinherited
updatedAt DateTime
read-only
urlAddress String
read-only
wKey WorkerKey
read-only

Methods

build(String apiKey, String path) List<Map<String, dynamic>>
future() Box
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited
update() Future<void>
Force get new data from http.
updateIfOld() String
updateShouldNotify(List<Map<String, dynamic>> previous, List<Map<String, dynamic>> next) bool
A method invoked when the state exposed by this Notifier changes. It compares the previous and new value, and return whether listeners should be notified.
inherited

Operators

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

Static Properties

hiveName String
read / write