ChannelModel class
The class that contains the information about a channel
- Annotations
-
- @JsonSerializable.new()
Constructors
-
ChannelModel({String? id, String? type, String? cid, List<
String> ? ownCapabilities, ChannelConfig? config, User? createdBy, bool frozen = false, DateTime? lastMessageAt, DateTime? createdAt, DateTime? updatedAt, DateTime? deletedAt, int memberCount = 0, List<Member> ? members, Map<String, Object?> extraData = const {}, String? team, int cooldown = 0, bool? disabled, DateTime? truncatedAt, int? messageCount, List<String> ? filterTags}) - 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
final
- config → ChannelConfig
-
The channel configuration data
final
- cooldown → int
-
The number of seconds in a cooldown
final
- createdAt → DateTime
-
The date of channel creation
final
- createdBy → User?
-
The user that created this channel
final
- deletedAt → DateTime?
-
The date of channel deletion
final
- disabled → bool?
-
True if the channel is disabled
no setter
-
extraData
→ Map<
String, Object?> -
Map of custom channel extraData
final
-
filterTags
→ List<
String> ? -
List of filter tags applied to the channel.
final
- frozen → bool
-
True if this channel is frozen
final
- hashCode → int
-
The hash code for this object.
no setterinherited
-
True if the channel is hidden
no setter
- id → String
-
The id of this channel
final
- lastMessageAt → DateTime?
-
The date of the last message
final
- lastUpdatedAt → DateTime
-
The date at which the channel was last updated.
no setter
- memberCount → int
-
The count of this channel members
final
-
members
→ List<
Member> ? -
The list of this channel members
final
- messageCount → int?
-
The total number of messages in the channel.
final
- name → String?
-
Shortcut for channel name
no setter
-
ownCapabilities
→ List<
ChannelCapability> ? -
List of various capabilities that a user can have in a channel.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- team → String?
-
The team the channel belongs to
final
- truncatedAt → DateTime?
-
The date of the last time channel got truncated
no setter
- type → String
-
The type of this channel
final
- updatedAt → DateTime
-
The date of the last channel update
final
Methods
-
copyWith(
{String? id, String? type, String? cid, List< String> ? ownCapabilities, ChannelConfig? config, User? createdBy, bool? frozen, DateTime? lastMessageAt, DateTime? createdAt, DateTime? updatedAt, DateTime? deletedAt, int? memberCount, List<Member> ? members, Map<String, Object?> ? extraData, String? team, int? cooldown, bool? disabled, DateTime? truncatedAt, int? messageCount, List<String> ? filterTags}) → ChannelModel - Creates a copy of ChannelModel with specified attributes overridden.
-
merge(
ChannelModel? other) → ChannelModel -
Returns a new ChannelModel that is a combination of this channelModel
and the given
otherchannelModel. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toJson(
) → Map< String, dynamic> - Serialize to json
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Constants
-
topLevelFields
→ const List<
String> -
Known top level fields.
Useful for
Serializermethods.