1

I am using ObjectBox Database in Flutter.

Now I want to observe the data of a particular entity and change the list when that entity will get updated.

I saw documentation DataObserver & Rx and tried to implement it as follows.

Stream<Query<InvoiceList>> watchedQuery = deliveryListBox!.query(InvoiceList_.dispatch.equals(true)).watch();
sub1 = watchedQuery.listen((Query<InvoiceList> query) {
  // This gets triggered any there are changes to the queried entity types.
  // You can call any query method here, for example:
  getDataFromLocal("");
});

I want to update the list when dispatch will get changed but nothing happening by this code.

Can anyone please help to achieve this?

vaind
  • 1,642
  • 10
  • 19
Pratik Butani
  • 60,504
  • 58
  • 273
  • 437

0 Answers0