HiveRepository class Journal Providers
This class load/save List of ServiceOfJournal for Journal.
It also:
- post new service,
- delete service,
- read services from hive(async) but provide sync values,
- and export it into json format.
- Inheritance
-
- Object
- BuildlessNotifier<
List< ServiceOfJournal> > - HiveRepository
- Annotations
-
- @Riverpod(keepAlive: true)
Constructors
Properties
- apiKey ↔ String
-
latefinalinherited
- archiveHiveName → String
-
read-only
- hashCode → int
-
The hash code for this object.
read-onlyinherited
- init ↔ bool
-
read / write
- journalHiveName → String
-
read-only
-
openArchiveHive
→ AsyncValue<
Box< ServiceOfJournal> > -
read-only
-
openHive
→ AsyncValue<
Box< ServiceOfJournal> > -
read-only
-
ref
→ NotifierProviderRef<
List< ServiceOfJournal> > -
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<
ServiceOfJournal> -
The value currently exposed by this Notifier.
read / writeinherited
-
stateOrNull
→ List<
ServiceOfJournal> ? -
The value currently exposed by this Notifier.
read-onlyinherited
Methods
-
add(
ServiceOfJournal s) → Future< int> -
archiveOldServices(
Iterable< ServiceOfJournal> currentState) → Future<void> - This function move old finished(and outDated) services to Hive box with name archiveHiveName.
-
build(
String apiKey) → List< ServiceOfJournal> -
delete(
ServiceOfJournal s) → Future< void> -
export(
DateTime start, DateTime end) → Future< String> -
Return json String with ServiceOfJournal between dates
startandend -
future(
) → Future< Box< ServiceOfJournal> > -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
readArchive(
) → AsyncValue< List< ServiceOfJournal> > -
toString(
) → String -
A string representation of this object.
inherited
-
updateShouldNotify(
List< ServiceOfJournal> previous, List<ServiceOfJournal> 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