OpenChannel class

Represents an open channel.

Inheritance
Available Extensions
Annotations

Constructors

OpenChannel({required int participantCount, required List<User> operators, required String channelUrl, String name = '', String coverUrl = '', int? createdAt, String data = '', String customType = '', bool isFrozen = false, bool isEphemeral = false})
OpenChannel.fromJson(Map<String, dynamic> json)
factory
OpenChannel.fromJsonWithChat(Chat chat, Map<String, dynamic> json)
factory

Properties

channelType ChannelType
ChannelType
read-onlyinherited
channelUrl String
The unique channel URL.
read / writeinherited
chat ↔ Chat
read / writeinherited
coverUrl String
The cover image URL.
read / writeinherited
createdAt int?
The creation time of the channel.
read / writeinherited
customType String
The custom type of the channel.
read / writeinherited
data String
The channel data.
read-onlyinherited
dirty bool
read / writeinherited
fromCache bool
read / writeinherited
hashCode int
The hash code for this object.
read-onlyoverride
isEphemeral bool
Whether the channel is ephemeral.
read-onlyinherited
isFrozen bool
Whether the channel is frozen.
read / writeinherited
key String
read-onlyinherited
name String
The topic or name of the channel.
read / writeinherited
operators List<User>
The operators of the channel.
read / write
participantCount int
The total number of participants in this channel.
read / write
primaryKey String
read-onlyinherited
runtimeType Type
A representation of the runtime type of the object.
read-onlyinherited

Methods

checkUnsupportedAction() → void
inherited
copyWith(dynamic other) → void
override
deleteChannel() Future<void>
Deletes an OpenChannel. Note that only operators of a channel are able to delete it or else, an error will be returned to the handler.
isOperator(String userId) bool
Checks if the given userId is an operator id of this channel.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
set(Chat chat) → void
inherited
toString() String
A string representation of this object.
inherited
updateChannel(OpenChannelUpdateParams params, {ProgressHandler? progressHandler}) Future<OpenChannel>
The custom type of the channel. You can set custom type of this channel by createChannel or updateChannel.

Operators

operator ==(Object other) bool
The equality operator.
override

Static Methods

createChannel(OpenChannelCreateParams params, {ProgressHandler? progressHandler, Chat? chat}) Future<OpenChannel>
Creates new OpenChannel with OpenChannelParams.
getChannel(String channelUrl, {Chat? chat}) Future<OpenChannel>
Gets a OpenChannel with given channel URL.
refresh(String channelUrl, {Chat? chat}) Future<OpenChannel>
Refreshes all the data of this channel.