BaseChannel class
Objects representing a channel.
Constructors
Properties
- channelType → ChannelType
-
ChannelType
no setter
- channelUrl ↔ String
-
The unique channel URL.
getter/setter pair
- chat ↔ Chat
-
getter/setter pair
- coverUrl ↔ String
-
The cover image URL.
getter/setter pair
- createdAt ↔ int?
-
The creation time of the channel.
getter/setter pair
- customType ↔ String
-
The custom type of the channel.
getter/setter pair
- data ↔ String
-
The channel data.
getter/setter pair
- dirty ↔ bool
-
getter/setter pair
- fromCache ↔ bool
-
getter/setter pair
- hashCode → int
-
The hash code for this object.
no setteroverride
- isEphemeral ↔ bool
-
Whether the channel is ephemeral.
getter/setter pair
- isFrozen ↔ bool
-
Whether the channel is frozen.
getter/setter pair
- key → String
-
no setter
- name ↔ String
-
The topic or name of the channel.
getter/setter pair
- primaryKey → String
-
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
addMessageMetaArrayValues(
BaseMessage message, List< MessageMetaArray> metaArrays) → Future<BaseMessage> -
Available on BaseChannel, provided by the BaseChannelMessageMetaArray extension
Adds message meta array values. -
addOperators(
List< String> userIds) → Future<void> -
Available on BaseChannel, provided by the BaseChannelOperator extension
Add operators to the channel. See https://docs.sendbird.com/platform/user_type#3_operator for the explanations on the operators. -
addReaction(
BaseMessage message, String key) → Future< ReactionEvent> -
Available on BaseChannel, provided by the BaseChannelReactions extension
AddsReaction
. -
banUser(
{required String userId, int seconds = -1, String? description}) → Future< void> -
Available on BaseChannel, provided by the BaseChannelModeration extension
Bans a user. Operators can ban users from this channel. Banned user is kicked out of this channel and cannot enter during the specified seconds. If you want to ban the user indefinitely, pass -1 to seconds as the argument. -
cancelFileMessageUpload(
String requestId) → bool -
Available on BaseChannel, provided by the BaseChannelMessage extension
Cancels an ongoingFileMessage
upload. -
checkUnsupportedAction(
) → void -
copyMessage(
BaseMessage message, BaseChannel targetChannel, {BaseMessageHandler? handler}) → BaseMessage -
Available on BaseChannel, provided by the BaseChannelMessage extension
Copies a message from this channel to the target channel. -
copyWith(
dynamic other) → void -
createMessageMetaArrayKeys(
BaseMessage message, List< String> keys) → Future<BaseMessage> -
Available on BaseChannel, provided by the BaseChannelMessageMetaArray extension
Creates message meta array keys. -
createMetaCounters(
Map< String, int> metaCounters) → Future<Map< String, int> > -
Available on BaseChannel, provided by the BaseChannelMetaCounters extension
Creates meta counters. This can be used to customize the channel. -
createMetaData(
Map< String, String> metaData) → Future<Map< String, String> > -
Available on BaseChannel, provided by the BaseChannelMetaData extension
Creates meta data. This can be used to customize the channel. -
decreaseMetaCounters(
Map< String, int> metaCounters) → Future<Map< String, int> > -
Available on BaseChannel, provided by the BaseChannelMetaCounters extension
Decreases meta counters. This decreases atomically the keyed meta counter by the specified value. -
deleteAllMetaCounters(
) → Future< void> -
Available on BaseChannel, provided by the BaseChannelMetaCounters extension
Deletes all meta counters. -
deleteAllMetaData(
) → Future< void> -
Available on BaseChannel, provided by the BaseChannelMetaData extension
Deletes all meta data. -
deleteMessage(
int messageId) → Future< void> -
Available on BaseChannel, provided by the BaseChannelMessage extension
Deletes a message. -
deleteMessageMetaArrayKeys(
BaseMessage message, List< String> keys) → Future<BaseMessage> -
Available on BaseChannel, provided by the BaseChannelMessageMetaArray extension
Deletes message meta array keys. -
deleteMetaCounters(
String key) → Future< void> -
Available on BaseChannel, provided by the BaseChannelMetaCounters extension
Deletes a meta counter. -
deleteMetaData(
String key) → Future< void> -
Available on BaseChannel, provided by the BaseChannelMetaData extension
Deletes a meta data. -
deleteReaction(
BaseMessage message, String key) → Future< ReactionEvent> -
Available on BaseChannel, provided by the BaseChannelReactions extension
DeletesReaction
. -
getAllMetaCounters(
) → Future< Map< String, int> > -
Available on BaseChannel, provided by the BaseChannelMetaCounters extension
Get all meta counters. -
getAllMetaData(
) → Future< Map< String, String> > -
Available on BaseChannel, provided by the BaseChannelMetaData extension
Gets all meta data. -
getCachedMetaData(
) → Map< String, String> -
Available on BaseChannel, provided by the BaseChannelMetaData extension
All locally cached metadata as a map. Cached metadata is updated under following circumstances: -
getMessageChangeLogs(
MessageChangeLogParams params, {int? timestamp, String? token}) → Future< MessageChangeLogs> -
Available on BaseChannel, provided by the BaseChannelMessage extension
Requests message change logs after given token or timestamp -
getMessagesByMessageId(
int messageId, MessageListParams params) → Future< List< RootMessage> > -
Available on BaseChannel, provided by the BaseChannelMessage extension
Retrieves previous or next messages based on the message ID in a specific channel. -
getMessagesByTimestamp(
int timestamp, MessageListParams params) → Future< List< RootMessage> > -
Available on BaseChannel, provided by the BaseChannelMessage extension
Retrieves previous or next messages based on the timestamp in a specific channel. -
getMetaCounters(
List< String> keys) → Future<Map< String, int> > -
Available on BaseChannel, provided by the BaseChannelMetaCounters extension
Gets meta counters. -
getMetaData(
List< String> keys) → Future<Map< String, String> > -
Available on BaseChannel, provided by the BaseChannelMetaData extension
Gets meta data. -
getMyMuteInfo(
) → Future< MuteInfo> -
Available on BaseChannel, provided by the BaseChannelModeration extension
Gets my muted information in this channel. -
increaseMetaCounters(
Map< String, int> metaCounters) → Future<Map< String, int> > -
Available on BaseChannel, provided by the BaseChannelMetaCounters extension
Increases meta counters. This increases atomically the keyed meta counter by the specified value. -
muteUser(
{required String userId, int seconds = -1, String? description}) → Future< void> -
Available on BaseChannel, provided by the BaseChannelModeration extension
MutesUser
. MutedUser
's messages are no longer delivered to currentUser
. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
removeAllOperators(
) → Future< void> -
Available on BaseChannel, provided by the BaseChannelOperator extension
Remove all operators from the channel. See https://docs.sendbird.com/platform/user_type#3_operator for the explanations on the operators. -
removeMessageMetaArrayValues(
BaseMessage message, List< MessageMetaArray> metaArrays) → Future<BaseMessage> -
Available on BaseChannel, provided by the BaseChannelMessageMetaArray extension
Removes message meta array values. -
removeOperators(
List< String> userIds) → Future<void> -
Available on BaseChannel, provided by the BaseChannelOperator extension
Remove operators from the channel. See https://docs.sendbird.com/platform/user_type#3_operator for the explanations on the operators. -
report(
{required ReportCategory category, String? description}) → Future< void> -
Available on BaseChannel, provided by the BaseChannelModeration extension
Reports this channel of inappropriate activities. -
reportMessage(
{required BaseMessage message, required ReportCategory category, String? description}) → Future< void> -
Available on BaseChannel, provided by the BaseChannelModeration extension
Reports a malicious message. -
reportUser(
{required String userId, required ReportCategory category, String? description}) → Future< void> -
Available on BaseChannel, provided by the BaseChannelModeration extension
Reports a user of suspicious activities. -
resendFileMessage(
FileMessage message, {File? file, FileMessageHandler? handler, ProgressHandler? progressHandler}) → FileMessage -
Available on BaseChannel, provided by the BaseChannelMessage extension
Resends a file with given file information.fileMessage
Failed fileMessage.file
File to resend. If there is a fileUrl or a fileBytes in fileMessage, this will be ignored. -
resendUserMessage(
UserMessage message, {UserMessageHandler? handler}) → UserMessage -
Available on BaseChannel, provided by the BaseChannelMessage extension
Resends a failed user message.message
is a failed user message. -
sendFileMessage(
FileMessageCreateParams params, {FileMessageHandler? handler, ProgressHandler? progressHandler, int? resendMessageId}) → FileMessage -
Available on BaseChannel, provided by the BaseChannelMessage extension
Sends a file with given file information. -
sendUserMessage(
UserMessageCreateParams params, {UserMessageHandler? handler, int? resendMessageId}) → UserMessage -
Available on BaseChannel, provided by the BaseChannelMessage extension
Sends a user message. -
sendUserMessageWithText(
String text, {UserMessageHandler? handler}) → UserMessage -
Available on BaseChannel, provided by the BaseChannelMessage extension
Sends a user message with text. -
serialize(
) → Uint8List -
set(
Chat chat) → void -
setCachedMetaData(
Map< String, String> metaData) → void -
Available on BaseChannel, provided by the BaseChannelMetaData extension
-
toJson(
) → Map< String, dynamic> -
toString(
) → String -
A string representation of this object.
inherited
-
translateUserMessage(
UserMessage message, List< String> targetLanguages) → Future<UserMessage> -
Available on BaseChannel, provided by the BaseChannelMessage extension
Translates a user message. -
unbanUser(
{required String userId}) → Future< void> -
Available on BaseChannel, provided by the BaseChannelModeration extension
UnbansUser
. Operators can unbanUser
who has been banned from this channel. -
unmuteUser(
{required String userId}) → Future< void> -
Available on BaseChannel, provided by the BaseChannelModeration extension
UnmutesUser
. UnmutedUser
's messages are again shown to currentUser
. -
updateFileMessage(
int messageId, FileMessageUpdateParams params) → Future< FileMessage> -
Available on BaseChannel, provided by the BaseChannelMessage extension
Updates aFileMessage
that was previously sent in the channel. Note that the file itself cannot be changed; only the fields stored within the message can be modified. -
updateMetaCounters(
Map< String, int> metaCounters) → Future<Map< String, int> > -
Available on BaseChannel, provided by the BaseChannelMetaCounters extension
Updates meta counters. -
updateMetaData(
Map< String, String> metaData) → Future<Map< String, String> > -
Available on BaseChannel, provided by the BaseChannelMetaData extension
Updates meta data. -
updateUserMessage(
int messageId, UserMessageUpdateParams params) → Future< UserMessage> -
Available on BaseChannel, provided by the BaseChannelMessage extension
Updates aUserMessage
that was previously sent in the channel.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
override
Static Methods
-
buildFromSerializedData(
Uint8List data) → BaseChannel? -
getBaseChannel(
ChannelType channelType, String channelUrl, {Chat? chat}) → Future< BaseChannel> -
refreshChannel(
ChannelType channelType, String channelUrl, {Chat? chat}) → Future< BaseChannel>