RoomSummary class

Represents a summary of a room, including the number of joined members and invited members.

The joinedMembers field represents the count of joined members in the room. The invitedMembers field represents the count of invited members in the room.

This class corresponds to the room summary object defined in the Matrix API specification. For more details, refer to the API documentation at https://matrix.org/docs/spec/client_server/latest#room-summary-object.

To create an instance of RoomSummary, use the provided factory constructors or the fromJson method. It is also possible to create an initial instance of RoomSummary using the initial factory constructor.

Example usage:

final roomSummary = RoomSummary.fromJson(jsonData);
final joinedMembers = roomSummary.joinedMembers;
final invitedMembers = roomSummary.invitedMembers;
Annotations
  • @Freezed(makeCollectionsUnmodifiable: false)

Constructors

RoomSummary({@JsonKey(name: 'm.joined_member_count', defaultValue: 0) int? joinedMembers, @JsonKey(name: 'm.invited_member_count', defaultValue: 0) int? invitedMembers})
Creates a RoomSummary instance.
factory
RoomSummary.fromJson(Map<String, dynamic> json)
Creates a RoomSummary instance from a JSON map.
factory
RoomSummary.initial()
Creates an initial RoomSummary instance.
factory

Properties

copyWith → $RoomSummaryCopyWith<RoomSummary>
no setterinherited
hashCode int
The hash code for this object.
no setterinherited
invitedMembers int?
no setterinherited
joinedMembers int?
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() Map<String, dynamic>
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited