Channel class Basic Features

Represents a single channel.

It shouldn't be instantiated directly, instead call PubNub.channel.

Properties

hashCode int
The hash code for this object.
no setterinherited
name String
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

addMessageAction({required String type, required String value, required Timetoken timetoken}) Future<AddMessageActionResult>
This method adds a message action to a parent message.
deleteMessageAction({required Timetoken messageTimetoken, required Timetoken actionTimetoken}) Future<DeleteMessageActionResult>
This method removes an existing message action (identified by actionTimetoken) from a parent message (identified by messageTimetoken).
fetchMessageActions({Timetoken? from, Timetoken? to, int? limit}) Future<FetchMessageActionsResult>
Returns all message actions of this channel.
history({ChannelHistoryOrder order = ChannelHistoryOrder.descending, int chunkSize = 100}) PaginatedChannelHistory
Returns PaginatedChannelHistory. Most useful in infinite list type scenario.
leave() Future<LeaveResult>
Explicitly announces a leave event for this keyset/channel combination.
messages({Timetoken? from, Timetoken? to}) ChannelHistory
Returns ChannelHistory. Used to retrieve many messages at once.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
publish(dynamic message, {bool? storeMessage, int? ttl, dynamic meta, bool? fire}) Future<PublishResult>
Publishes message to a channel name.
toString() String
A string representation of this object.
inherited

Operators

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