BaseChannel class
Represents base channel
This class contains properties and methods for both GroupChannel and OpenChannel. Note that this is base class for two offical types - group and open - so you won't have any given channel that only derives from this class.
- Implemented types
- Implementers
- Available extensions
Constructors
Properties
- channelType → ChannelType
-
Channel type for this channel
no setter
- channelUrl ↔ String
-
This channel url
getter/setter pair
- coverUrl ↔ String?
-
cover image URL for this channel
getter/setter pair
- createdAt ↔ int?
-
timestamp when this channel is created
getter/setter pair
- creator ↔ User?
-
User who creates this channel
getter/setter pair
- customType ↔ String?
-
custom type for this channel
getter/setter pair
- data ↔ String?
-
custom data for this channel
getter/setter pair
- dirty ↔ bool
-
getter/setter pairoverride
- fromCache ↔ bool
-
local usage
getter/setter pair
- hashCode → int
-
The hash code for this object.
no setteroverride
- isEphemeral ↔ bool
-
True if this channel is ephemeral
getter/setter pair
- isFrozen ↔ bool
-
Ture if this channel is frozen
getter/setter pair
- key → String
-
no setteroverride
- name ↔ String?
-
name for this channel
getter/setter pair
- primaryKey → String
-
no setteroverride
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
addMessageMetaArray(
BaseMessage message, List< MessageMetaArray> metaArrays) → Future<BaseMessage> -
Available on BaseChannel, provided by the Meta extension
Adds list ofmetaArrays
with givenmessage
. -
addOperators(
List< String> userIds) → Future<void> -
Available on BaseChannel, provided by the BaseChannelConfiguration extension
Adds operators on this channel with givenuserIds
. -
addPollOption(
{required int pollId, required String optionText, OnPollCallback? onCompleted}) → Future< Poll> -
Available on BaseChannel, provided by the Messages extension
Add Poll Option -
addReaction(
BaseMessage message, String key) → Future< ReactionEvent> -
Available on BaseChannel, provided by the Reactions extension
Adds reactionkey
to givenmessage
-
banUser(
{required String userId, int seconds = -1, String? description}) → Future< void> -
Available on BaseChannel, provided by the Moderations extension
Bans a user from this channel. -
cancelScheduledMessage(
int scheduledMessageId, {OnScheduledMessageCancelCallback? callback}) → Future< void> -
Available on BaseChannel, provided by the Messages extension
Cancels scheduled message -
cancelUploadingFileMessage(
String requestId) → bool -
Available on BaseChannel, provided by the Messages extension
-
closePoll(
{required int pollId, OnPollCallback? onCompleted}) → Future< Poll> -
Available on BaseChannel, provided by the Messages extension
Close Poll -
copyMessage(
BaseMessage message, BaseChannel targetChannel, {OnMessageCallback? onCompleted}) → BaseMessage -
Available on BaseChannel, provided by the Messages extension
Copiesmessage
totargetChannel
. -
copyWith(
dynamic others) → void -
override
-
createMetaCounters(
Map< String, int> metaCounters) → Future<Map< String, int> > -
Available on BaseChannel, provided by the Meta extension
Creates meta counters on this channel withmetaCounters
. -
createMetaData(
Map< String, String> metaData) → Future<Map< String, String> > -
Available on BaseChannel, provided by the Meta extension
Creates meta data on this channel withmetaData
. -
createScheduledFileMessage(
ScheduledFileMessageParams fileMessageParams, {OnScheduledMessageCallback< ScheduledFileMessage> ? callback}) → Future<ScheduledFileMessage> -
Available on BaseChannel, provided by the Messages extension
Creates scheduled file message -
createScheduledUserMessage(
ScheduledUserMessageParams userMessageParams, {OnScheduledMessageCallback< ScheduledUserMessage> ? callback}) → Future<ScheduledUserMessage> -
Available on BaseChannel, provided by the Messages extension
Creates scheduled user message -
decreaseMetaCounters(
Map< String, int> metaCounters) → Future<Map< String, int> > -
Available on BaseChannel, provided by the Meta extension
Decreases meta counters on this channel withmetaCounters
. -
deleteAllMetaCounters(
) → Future< void> -
Available on BaseChannel, provided by the Meta extension
Deletes all meta counters -
deleteAllMetaData(
) → Future< void> -
Available on BaseChannel, provided by the Meta extension
Deletes a meta data on this channel with key. -
deleteMessage(
int messageId) → Future< void> -
Available on BaseChannel, provided by the Messages extension
Deletes message with givenmessageId
. -
deleteMessageMetaArrayKeys(
BaseMessage message, List< String> keys) → Future<BaseMessage> -
Available on BaseChannel, provided by the Meta extension
Deleteskeys
from MessageMetaArray givenmessage
. -
deleteMetaCounters(
String key) → Future< void> -
Available on BaseChannel, provided by the Meta extension
Deletes a meta counter with givenkey
-
deleteMetaData(
String key) → Future< void> -
Available on BaseChannel, provided by the Meta extension
Deletes a meta data on this channel withkey
. -
deletePoll(
{required int pollId, OnCompleteCallback? onCompleted}) → Future< void> -
Available on BaseChannel, provided by the Messages extension
Delete Poll -
deletePollOption(
{required int pollId, required int pollOptionId, OnCompleteCallback? onCompleted}) → Future< void> -
Available on BaseChannel, provided by the Messages extension
Delete Poll Option -
deleteReaction(
BaseMessage message, String key) → Future< ReactionEvent> -
Available on BaseChannel, provided by the Reactions extension
Deletes reactionkey
frommessage
-
getAllMetaCounters(
) → Future< Map< String, int> > -
Available on BaseChannel, provided by the Meta extension
Retrieves all meta counters from this channel. -
getAllMetaData(
) → Future< Map< String, String> > -
Available on BaseChannel, provided by the Meta extension
Retrieves all metaData from this channel. -
getCachedMetaData(
) → Map< String, String> -
Available on BaseChannel, provided by the Meta extension
Returns cached meta data -
getMessageChangeLogs(
{int? timestamp, String? token, required MessageChangeLogParams params}) → Future< MessageChangeLogsResponse> -
Available on BaseChannel, provided by the Messages extension
Retreieve massage change logs withtimestamp
ortoken
andparams
. -
getMessagesById(
int messageId, MessageListParams params) → Future< List< BaseMessage> > -
Available on BaseChannel, provided by the Messages extension
Retrieves a list of BaseMessage with givenmessageId
andparams
. -
getMessagesByTimestamp(
int timestamp, MessageListParams params) → Future< List< BaseMessage> > -
Available on BaseChannel, provided by the Messages extension
Retrieves a list of BaseMessage with giventimestamp
andparams
. -
getMetaCounters(
List< String> keys) → Future<Map< String, int> > -
Available on BaseChannel, provided by the Meta extension
Retrieves meta counters from this channel withkeys
. -
getMetaData(
List< String> keys) → Future<Map< String, String> > -
Available on BaseChannel, provided by the Meta extension
Retrieves meta data from this channel withkeys
. -
getMyMuteInfo(
) → Future< MuteInfoResponse> -
Available on BaseChannel, provided by the Moderations extension
Gets current user's mute information -
increaseMetaCounters(
Map< String, int> metaCounters) → Future<Map< String, int> > -
Available on BaseChannel, provided by the Meta extension
Increases meta counters on this channel withmetaCounters
. -
muteUser(
{required String userId, int seconds = -1, String? description}) → Future< void> -
Available on BaseChannel, provided by the Moderations extension
Mutes a user from this channel. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
removeAllOperators(
) → Future< void> -
Available on BaseChannel, provided by the BaseChannelConfiguration extension
Removes all operators on this channel. -
removeFromCache(
) → void -
removeMessageMetaArray(
BaseMessage message, List< MessageMetaArray> metaArrays) → Future<BaseMessage> -
Available on BaseChannel, provided by the Meta extension
Removes values from list ofmetaArrays
with givenmessage
-
removeOperators(
List< String> userIds) → Future<void> -
Available on BaseChannel, provided by the BaseChannelConfiguration extension
Removes operators on this channel with givenuserIds
. -
reportChannel(
{required ReportCategory category, String? description}) → Future< void> -
Available on BaseChannel, provided by the Moderations extension
Reports this channel withcategory
anddescription
(optional) -
reportMessage(
{required BaseMessage message, required ReportCategory category, String? description}) → Future< void> -
Available on BaseChannel, provided by the Moderations extension
Reportsmessage
withcategory
anddescription
(optional) -
reportUser(
{required String userId, required ReportCategory category, String? description}) → Future< void> -
Available on BaseChannel, provided by the Moderations extension
Reports a User withcategory
anddescription
(optional) -
resendFileMessage(
FileMessage message, {required FileMessageParams params, OnFileMessageCallback? onCompleted, OnUploadProgressCallback? progress}) → FileMessage -
Available on BaseChannel, provided by the Messages extension
Resends failed FileMessage on this channel withmessage
. -
resendUserMessage(
UserMessage message, {OnUserMessageCallback? onCompleted}) → UserMessage -
Available on BaseChannel, provided by the Messages extension
Resends failed UserMessage on this channel withmessage
. -
saveToCache(
) → void -
sendFileMessage(
FileMessageParams params, {OnFileMessageCallback? onCompleted, OnUploadProgressCallback? progress}) → FileMessage -
Available on BaseChannel, provided by the Messages extension
Sends FileMessage on this channel withparams
. -
sendScheduledMessageNow(
{required int scheduledMessageId, OnScheduledMessageSendNowCallback? callback}) → Future< void> -
Available on BaseChannel, provided by the Messages extension
Sends Scheduled Message Now -
sendUserMessage(
UserMessageParams params, {OnUserMessageCallback? onCompleted}) → UserMessage -
Available on BaseChannel, provided by the Messages extension
Sends UserMessage on this channel withparams
. -
sendUserMessageWithText(
String text, {OnUserMessageCallback? onCompleted}) → UserMessage -
Available on BaseChannel, provided by the Messages extension
Sends UserMessage on this channel withtext
. -
toString(
) → String -
A string representation of this object.
inherited
-
translateUserMessage(
UserMessage message, List< String> targetLanguages) → Future<UserMessage> -
Available on BaseChannel, provided by the Messages extension
Translates amessage
with given list oftargetLanguages
. -
unbanUser(
{required String userId}) → Future< void> -
Available on BaseChannel, provided by the Moderations extension
Unbans a user from this channel -
unmuteUser(
{required String userId}) → Future< void> -
Available on BaseChannel, provided by the Moderations extension
Unmutes user from this channel. -
updateFileMessage(
int messageId, FileMessageParams params) → Future< FileMessage> -
Available on BaseChannel, provided by the Messages extension
Updates FileMessage on this channel withmessageId
andparams
. -
updateMetaCounters(
Map< String, int> metaCounters) → Future<Map< String, int> > -
Available on BaseChannel, provided by the Meta extension
Updates meta counters on this channel withmetaCounters
. -
updateMetaData(
Map< String, String> metaData) → Future<Map< String, String> > -
Available on BaseChannel, provided by the Meta extension
Updates meta data on this channel withmetaData
. -
updatePoll(
{required int pollId, required PollUpdateParams params, OnPollCallback? onCompleted}) → Future< Poll> -
Available on BaseChannel, provided by the Messages extension
Updates Poll -
updatePollOption(
{required int pollId, required int pollOptionId, required String optionText, OnPollCallback? onCompleted}) → Future< Poll> -
Available on BaseChannel, provided by the Messages extension
Update Poll Option -
updateScheduledFileMessage(
{required ScheduledFileMessageUpdateParams params, required int scheduledMessageid, OnScheduledMessageCallback< ScheduledFileMessage> ? callback}) → Future<ScheduledFileMessage> -
Available on BaseChannel, provided by the Messages extension
Update scheduled file message -
updateScheduledUserMessage(
{required ScheduledUserMessageUpdateParams params, required int scheduledMessageid, OnScheduledMessageCallback< ScheduledUserMessage> ? callback}) → Future<ScheduledUserMessage> -
Available on BaseChannel, provided by the Messages extension
Update scheduled user message -
updateUserMessage(
int messageId, UserMessageParams params) → Future< UserMessage> -
Available on BaseChannel, provided by the Messages extension
Updates UserMessage on this channel withmessageId
andparams
. -
votePoll(
{required int pollId, required List< int> pollOptionIds, OnPollVoteEventCallback? onCompleted}) → Future<PollVoteEvent> -
Available on BaseChannel, provided by the Messages extension
Cast/ Cancel Poll Vote
Operators
-
operator ==(
Object other) → bool -
The equality operator.
override
Static Methods
-
getBaseChannel(
ChannelType type, String channelUrl) → Future< BaseChannel> -
Returns channel with given
type
andchannelUrl
-
refreshChannel(
ChannelType channelType, String channelUrl) → Future< BaseChannel> - Refreshes this channel instance