notifyMetaCountersChanged method

void notifyMetaCountersChanged(
  1. BaseChannel channel,
  2. Map<String, dynamic> data
)

Implementation

void notifyMetaCountersChanged(
    BaseChannel channel, Map<String, dynamic> data) {
  _channelHandlers.values.forEach((element) {
    final created = Map<String, int>.from(data['created'] ?? {});
    final updated = Map<String, int>.from(data['updated'] ?? {});
    final deleted = List<String>.from(data['deleted'] ?? []);

    if (created.isNotEmpty) element.onMetaCountersCreated(channel, created);
    if (updated.isNotEmpty) element.onMetaCountersUpdated(channel, updated);
    if (deleted.isNotEmpty) element.onMetaCountersDeleted(channel, deleted);
  });
}