Channel constructor
Channel(})
Class that manages a specific channel.
Optional extraData
and image
properties can be provided. The image
is exposed to easily set a key of 'image' on extraData
.
Implementation
Channel(
this._client,
this._type,
this._id, {
String? name,
String? image,
Map<String, Object?>? extraData,
}) : _cid = _id != null ? '$_type:$_id' : null,
_extraData = {
...?extraData,
if (name != null) 'name': name,
if (image != null) 'image': image,
} {
_client.logger.info('New Channel instance created, not yet initialized');
}