ChannelState class

The class that contains the information about a channel

Annotations
  • @JsonSerializable.new()

Constructors

ChannelState({ChannelModel? channel, List<Message>? messages, List<Member>? members, List<Message>? pinnedMessages, int? watcherCount, List<User>? watchers, List<Read>? read, Member? membership, Draft? draft, List<Message>? pendingMessages, ChannelPushPreference? pushPreferences})
Constructor used for json serialization
const

Properties

channel ChannelModel?
The channel to which this state belongs
final
draft Draft?
The draft message for this channel if it exists.
final
hashCode int
The hash code for this object.
no setterinherited
members List<Member>?
A paginated list of channel members
final
membership Member?
Relationship of the current user to this channel.
final
messages List<Message>?
A paginated list of channel messages
final
pendingMessages List<Message>?
List of messages pending for moderation on this channel.
final
pinnedMessages List<Message>?
A paginated list of pinned messages
final
pushPreferences ChannelPushPreference?
The push preferences for this channel if it exists.
final
read List<Read>?
The list of channel reads
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
watcherCount int?
The count of users watching the channel
final
watchers List<User>?
A paginated list of users watching the channel
final

Methods

copyWith({ChannelModel? channel, List<Message>? messages, List<Member>? members, List<Message>? pinnedMessages, int? watcherCount, List<User>? watchers, List<Read>? read, Member? membership, Object? draft = _nullConst, List<Message>? pendingMessages, ChannelPushPreference? pushPreferences}) ChannelState
Creates a copy of ChannelState with specified attributes overridden.
getComparableField(String sortKey) → ComparableField?
Gets a comparable field value for the given sortKey.
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

Static Methods

fromJson(Map<String, dynamic> json) ChannelState
Create a new instance from a json