getChannel method

Future<Channel> getChannel({
  1. required String id,
  2. required String type,
})

Returns/Creates a new Channel and starts watching it.

Implementation

Future<Channel> getChannel({
  required String id,
  required String type,
}) async {
  final channel = client.channel(type, id: id);
  await channel.watch();
  return channel;
}