Channel constructor

const Channel({
  1. required String id,
  2. required List<UserPresence> presences,
  3. required UserPresence self,
  4. required String roomName,
  5. required String groupId,
  6. required String userIdOne,
  7. required String userIdTwo,
})

Implementation

const factory Channel({
  /// The ID of the channel.
  required String id,

  /// The users currently in the channel.
  required List<UserPresence> presences,

  /// A reference to the current user's presence in the channel.
  required UserPresence self,

  /// The name of the chat room, or an empty string if this message was not
  /// sent through a chat room.
  required String roomName,

  /// The ID of the group, or an empty string if this message was not sent
  /// through a group channel.
  required String groupId,

  /// The ID of the first DM user, or an empty string if this message was not
  /// sent through a DM chat.
  required String userIdOne,

  /// The ID of the second DM user, or an empty string if this message was not
  /// sent through a DM chat.
  required String userIdTwo,
}) = _Channel;