EventChannel class Null safety

The channel embedded in the event object

Inheritance
Annotations

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
@JsonKey(includeIfNull: false, toJson: Serializer.readOnly), final, inherited
config ChannelConfig
The channel configuration data
@JsonKey(includeIfNull: false, toJson: Serializer.readOnly), final, inherited
cooldown int
The number of seconds in a cooldown
@JsonKey(includeIfNull: false), final, inherited
createdAt DateTime
The date of channel creation
@JsonKey(includeIfNull: false, toJson: Serializer.readOnly), final, inherited
createdBy User?
The user that created this channel
@JsonKey(includeIfNull: false, toJson: Serializer.readOnly), final, inherited
deletedAt DateTime?
The date of channel deletion
@JsonKey(includeIfNull: false, toJson: Serializer.readOnly), final, inherited
extraData Map<String, Object?>
Map of custom channel extraData
@JsonKey(includeIfNull: false), final, inherited
frozen bool
True if this channel is frozen
@JsonKey(includeIfNull: false), final, inherited
hashCode int
The hash code for this object. [...]
read-only, inherited
id String
The id of this channel
final, inherited
lastMessageAt DateTime?
The date of the last message
@JsonKey(includeIfNull: false, toJson: Serializer.readOnly), final, inherited
memberCount int
The count of this channel members
@JsonKey(includeIfNull: false, toJson: Serializer.readOnly), final, inherited
members List<Member>?
A paginated list of channel members
final
name String
Shortcut for channel name
read-only, inherited
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited
team String?
The team the channel belongs to
@JsonKey(includeIfNull: false, toJson: Serializer.readOnly), final, inherited
type String
The type of this channel
final, inherited
updatedAt DateTime
The date of the last channel update
@JsonKey(includeIfNull: false, toJson: Serializer.readOnly), final, inherited

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 non-existent 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