Closed themumy10 closed 2 years ago
Use a StreamController / StreamSink and make the watcher add events on that sink. Simple.
Watcher event does not update on add to box. While using a bloc pattern design watch method doesn't update on add event
@themumy10 this seems to work for listening box changes.
Hive.box("user").listenable().addListener(() { voidCallback.call(); });
I m trying to listen for changes in box by using bloc pattern. I need stream subscription for my database changes.
We need a watch method for box. Because of lazy initialization of the box I think this is not possible. So instead of lazy box we may divide boxes into two categories.
We need an un-lazy box to subscribe changes in database changes
Version