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