chatRepository method

  1. @override
ChatRepository? chatRepository(
  1. String? appId,
  2. String? roomId
)
override

Implementation

@override
ChatRepository? chatRepository(String? appId, String? roomId) {
  var key = appId == null || roomId == null ? null : '$appId-$roomId';
  if ((key != null) && (_chatRepository[key] == null)) {
    _chatRepository[key] = ChatCache(ChatFirestore(
        () => roomRepository(appId)!.getSubCollection(roomId!, 'chat'),
        appId!));
  }
  return _chatRepository[key];
}