ChannelState class

The class that contains the information about a channel

Annotations
  • @JsonSerializable()

Constructors

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

Properties

channel ChannelModel?
The channel to which this state belongs
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
pinnedMessages List<Message>?
A paginated list of pinned messages
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}) ChannelState
Creates a copy of ChannelState with specified attributes overridden.
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