getChannel static method

Future<GroupChannel> getChannel(
  1. String channelUrl
)

Gets an GroupChannel with given channelUrl

Implementation

static Future<GroupChannel> getChannel(String channelUrl) async {
  final sdk = SendbirdSdk().getInternal();
  var channel = sdk.cache.find<GroupChannel>(channelKey: channelUrl);
  if (channel != null && !channel.dirty) {
    channel.fromCache = true;
    return channel;
  }
  return GroupChannel.refresh(channelUrl);
}