watch method
Returns a stream of changes.
Use the optional key
parameter to filter events or leave it empty to get
all changes.
Implementation
@override
Stream<({String key, dynamic value, bool isDeleted})> watch(String table,
{String? key}) {
if (!tables.contains(table)) throw 'Unknown table: $table';
return key == null
? _changeControllers[table]!.stream
: _changeControllers[table]!.stream.where((event) => event.key == key);
}