ChannelState class Null safety

The class that contains the information about a channel

Annotations

Constructors

ChannelState({ChannelModel? channel, List<Message> messages = const [], List<Member> members = const [], List<Message> pinnedMessages = 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
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.
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, List<Message>? pinnedMessages, 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
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