watch method

void watch(
  1. StreamController streamController,
  2. M7Query<M7Table> query
)

to add a new listener to _streamsMap to notified when changes happened to the table

Implementation

void watch(StreamController streamController, M7Query query) {
  _streamsMap[streamController] =
      () async => (await query()).map(fromDB).toList();
  notifyListener();
}