EventChannel class

The channel embedded in the event object

Inheritance
Annotations
  • @JsonSerializable(createToJson: false)

Constructors

EventChannel({List<Member>? members, String? id, String? type, required String cid, required ChannelConfig config, User? createdBy, bool frozen = false, DateTime? lastMessageAt, required DateTime createdAt, required DateTime updatedAt, DateTime? deletedAt, int memberCount = 0, Map<String, Object?>? extraData, int cooldown = 0, String? team})
Constructor used for json serialization
EventChannel.fromJson(Map<String, dynamic> json)
Create a new instance from a json
factory

Properties

cid String
The cid of this channel
finalinherited
config ChannelConfig
The channel configuration data
finalinherited
cooldown int
The number of seconds in a cooldown
finalinherited
createdAt DateTime
The date of channel creation
finalinherited
createdBy User?
The user that created this channel
finalinherited
deletedAt DateTime?
The date of channel deletion
finalinherited
extraData Map<String, Object?>
Map of custom channel extraData
finalinherited
frozen bool
True if this channel is frozen
finalinherited
hashCode int
The hash code for this object.
no setterinherited
id String
The id of this channel
finalinherited
lastMessageAt DateTime?
The date of the last message
finalinherited
memberCount int
The count of this channel members
finalinherited
members List<Member>?
A paginated list of channel members
final
name String
Shortcut for channel name
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
team String?
The team the channel belongs to
finalinherited
type String
The type of this channel
finalinherited
updatedAt DateTime
The date of the last channel update
finalinherited

Methods

copyWith({String? id, String? type, String? cid, ChannelConfig? config, User? createdBy, bool? frozen, DateTime? lastMessageAt, DateTime? createdAt, DateTime? updatedAt, DateTime? deletedAt, int? memberCount, Map<String, Object?>? extraData, String? team, int? cooldown}) ChannelModel
Creates a copy of ChannelModel with specified attributes overridden.
inherited
merge(ChannelModel? other) ChannelModel
Returns a new ChannelModel that is a combination of this channelModel and the given other channelModel.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() Map<String, dynamic>
Serialize to json
inherited
toString() String
A string representation of this object.
inherited

Operators

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

Static Properties

topLevelFields List<String>
Known top level fields. Useful for Serializer methods.
final