onCacheChange method
Implementation
@override
StreamSubscription<dynamic> onCacheChange(CacheChangeListener callback) {
return realmEventChannel.receiveBroadcastStream().listen((event) {
List<Map<String, dynamic>> data = (event as List<Map<Object?, Object?>>)
.map((e) => e.cast<String, dynamic>())
.toList();
callback(data);
});
}