cacheReadReceipt method Null safety

void cacheReadReceipt(
  1. BaseChannel channel
)

Implementation

void cacheReadReceipt(BaseChannel channel) {
  if (this['read_receipt'] != null) {
    final data = Map<String, int>.from(this['read_receipt']);
    data.forEach((key, value) {
      final status = ReadStatus(
        channelType: channel.channelType,
        channelUrl: channel.channelUrl,
        userId: key,
        timestamp: value,
      );
      status.saveToCache();
    });
  }
}