ChannelModel class

The class that contains the information about a channel

Implementers
Annotations

Constructors

ChannelModel({String id, String type, String cid, ChannelConfig config, User createdBy, bool frozen, DateTime lastMessageAt, DateTime createdAt, DateTime updatedAt, DateTime deletedAt, int memberCount, Map<String, dynamic> extraData})
Constructor used for json serialization
ChannelModel.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: Serialization.readOnly), final
config ChannelConfig
The channel configuration data
@JsonKey(includeIfNull: false, toJson: Serialization.readOnly), final
createdAt DateTime
The date of channel creation
@JsonKey(includeIfNull: false, toJson: Serialization.readOnly), final
createdBy User
The user that created this channel
@JsonKey(includeIfNull: false, toJson: Serialization.readOnly), final
deletedAt DateTime
The date of channel deletion
@JsonKey(includeIfNull: false, toJson: Serialization.readOnly), final
extraData Map<String, dynamic>
Map of custom channel extraData
@JsonKey(includeIfNull: false), final
frozen bool
True if this channel is frozen
@JsonKey(includeIfNull: false), final
hashCode int
The hash code for this object. [...]
read-only, inherited
id String
The id of this channel
final
lastMessageAt DateTime
The date of the last message
@JsonKey(includeIfNull: false, toJson: Serialization.readOnly), final
memberCount int
The count of this channel members
@JsonKey(includeIfNull: false, toJson: Serialization.readOnly), final
name String
Shortcut for channel name
read-only
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited
type String
The type of this channel
final
updatedAt DateTime
The date of the last channel update
@JsonKey(includeIfNull: false, toJson: Serialization.readOnly), final

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, dynamic> extraData}) ChannelModel
Creates a copy of ChannelModel with specified attributes overridden.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed. [...]
inherited
toJson() Map<String, dynamic>
Serialize to json
toString() String
Returns a string representation of this object.
inherited

Operators

operator ==(dynamic other) bool
The equality operator. [...]
inherited

Constants

topLevelFields → const List<String>
Known top level fields. Useful for Serialization methods.
const ['id', 'type', 'cid', 'config', 'created_by', 'frozen', 'last_message_at', 'created_at', 'updated_at', 'deleted_at'…