EventChannel class
The channel embedded in the event object
- Inheritance
-
- Object
- ChannelModel
- EventChannel
- Annotations
-
- @JsonSerializable(createToJson: false)
Constructors
-
EventChannel({List<
Member> ? members, String? id, String? type, required String cid, List<String> ? ownCapabilities, 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, bool? disabled, DateTime? truncatedAt}) - 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
- disabled → bool?
-
True if the channel is disabled
no setterinherited
-
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
-
True if the channel is hidden
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
-
ownCapabilities
→ List<
String> ? -
List of user permissions on this channel
finalinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- team → String?
-
The team the channel belongs to
finalinherited
- truncatedAt → DateTime?
-
The date of the last time channel got truncated
no setterinherited
- 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, List< String> ? ownCapabilities, ChannelConfig? config, User? createdBy, bool? frozen, DateTime? lastMessageAt, DateTime? createdAt, DateTime? updatedAt, DateTime? deletedAt, int? memberCount, Map<String, Object?> ? extraData, String? team, int? cooldown, bool? disabled, DateTime? truncatedAt}) → 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