getChannelFromCache static method

GroupChannel? getChannelFromCache(
  1. String channelUrl,
  2. {Chat? chat}
)

Implementation

static GroupChannel? getChannelFromCache(
  String channelUrl, {
  Chat? chat,
}) {
  chat ??= SendbirdChat().chat;

  final channel =
      chat.channelCache.find<GroupChannel>(channelKey: channelUrl);
  if (channel != null) {
    channel.fromCache = true;
    return channel;
  }
  return null;
}