Closed Prn-Ice closed 2 years ago
Hi,
You just need to use the on
method on the vault or on the cache, snippet bellow for a vault and the memory store:
// Creates a store
final store = await newMemoryVaultStore();
// Creates a vault from the previously created store
final vault = await store.vault<Task>(name: 'vault'):
// Returns a stream of created entries. You may subscribe to all the events instead
final stream = vault.on<VaultEntryCreatedEvent<Task>>();
You can find additional documentation on the Events section of the stash documentation
Awesome, thanks
This is a question.
How do I retrieve a stream of cached values that can be used in a reactive user interface. Hive itself offers an implementation of this.