channel method

Channel channel(
  1. String type, {
  2. String? id,
  3. Map<String, Object?>? extraData,
})

Returns a channel client with the given type, id and custom data.

Implementation

Channel channel(
  String type, {
  String? id,
  Map<String, Object?>? extraData,
}) {
  if (id != null && state.channels.containsKey('$type:$id')) {
    return state.channels['$type:$id']!;
  }
  return Channel(this, type, id, extraData: extraData);
}