Merge pull request #2071 from famedly/yg/dartdoc-user-305

fix: add proper description for `User` class
This commit is contained in:
Krille-chan 2025-04-14 08:35:31 +02:00 committed by GitHub
commit 02e481ab52
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 10 additions and 1 deletions

View File

@ -18,7 +18,16 @@
import 'package:matrix/matrix.dart';
/// Represents a Matrix User which may be a participant in a Matrix Room.
/// Represents a user in the context of a Matrix room, not a global user profile.
///
/// This class extends [StrippedStateEvent] to handle room-specific user state,
/// including membership status, display name, and avatar within that room.
/// The user information is derived from room member state events.
///
/// For example, a user may have different display names or avatars in different rooms,
/// and this class represents that room-specific view of the user rather than their
/// global profile.
///
class User extends StrippedStateEvent {
final Room room;
final Map<String, Object?>? prevContent;