ChannelState class

The class that contains the information about a command

Annotations

Constructors

ChannelState({ChannelModel channel, List<Message> messages: const [], List<Member> members: const [], int watcherCount, List<User> watchers: const [], List<Read> read: const []})
Constructor used for json serialization

Properties

channel ChannelModel
The channel to which this state belongs
final
hashCode int
The hash code for this object. [...]
read-only, inherited
members List<Member>
A paginated list of channel members
final
messages List<Message>
A paginated list of channel messages
final
read List<Read>
The list of channel reads
final
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited
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, int watcherCount, List<User> watchers, List<Read> read}) ChannelState
Creates a copy of ChannelState 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

Static Methods

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