nameStream property
Channel name as a stream.
The channel needs to be initialized.
If an optional name argument is provided in the constructor then it will be set on extraData with a key of 'name'.
final channel = Channel(client, type, id, name: 'Channel name');
print(channel.name == channel.extraData['name']); // true
Before the channel is initialized the name can be set directly:
channel.name = 'New channel name';
To update the name after the channel has been initialized, call:
channel.updateName('Updated channel name');
This will do a partial update to update the name.
Implementation
Stream<String?> get nameStream {
_checkInitialized();
return extraDataStream.map((it) => it['name'] as String?);
}