getBaseChannel static method

Future<BaseChannel> getBaseChannel(
  1. ChannelType type,
  2. String channelUrl,
  3. {Chat? chat}
)

Implementation

static Future<BaseChannel> getBaseChannel(
  ChannelType type,
  String channelUrl, {
  Chat? chat,
}) async {
  switch (type) {
    case ChannelType.group:
      return GroupChannel.getChannel(channelUrl, chat: chat);
    case ChannelType.open:
      return OpenChannel.getChannel(channelUrl, chat: chat);
    case ChannelType.feed:
      return FeedChannel.getChannel(channelUrl, chat: chat);
  }
}