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