Open tazik561 opened 3 years ago
Why I can't find an example about watch listener? I have this method :
Stream<List<VocabularyModel>> watchVocabsFromdb() => hiveService.vocabularyBox .watch() .map((event) => hiveService.vocabularyBox.values .where((element) => element.remember == true) .toList());
I want every time my box is changed I get new value so I wrote above code, But I always receive empty value In the event that in this method return values :
List<VocabularyModel> getRememberVocabsFromdb() => hiveService.vocabularyBox.values .where((element) => element.remember == true) .toList();
How can I get value from Box Event to make my query?
I'm not sure if it's the same case, but this code always return the old values:
box.watch().listen((event) => box.values);
I'm wondering "why"?
Why I can't find an example about watch listener? I have this method :
I want every time my box is changed I get new value so I wrote above code, But I always receive empty value In the event that in this method return values :
How can I get value from Box Event to make my query?