diff --git a/packages/stream_chat/lib/src/core/models/own_user.dart b/packages/stream_chat/lib/src/core/models/own_user.dart index ee81e909..a65052f4 100644 --- a/packages/stream_chat/lib/src/core/models/own_user.dart +++ b/packages/stream_chat/lib/src/core/models/own_user.dart @@ -7,11 +7,12 @@ import 'package:stream_chat/stream_chat.dart'; part 'own_user.g.dart'; -/// The class that defines the own user model -/// This object can be found in [Event] +/// The class that defines the own user model. +/// +/// This object can be found in [Event]. @JsonSerializable(createToJson: false) class OwnUser extends User { - /// Constructor used for json serialization + /// Constructor used for json serialization. OwnUser({ this.devices = const [], this.mutes = const [], @@ -45,11 +46,11 @@ class OwnUser extends User { language: language, ); - /// Create a new instance from a json + /// Create a new instance from json. factory OwnUser.fromJson(Map json) => _$OwnUserFromJson( Serializer.moveToExtraDataFromRoot(json, topLevelFields)); - /// Create a new instance from [User] object + /// Create a new instance from [User] object. factory OwnUser.fromUser(User user) => OwnUser( id: user.id, role: user.role, @@ -133,27 +134,28 @@ class OwnUser extends User { ); } - /// List of user devices + /// List of user devices. @JsonKey(includeIfNull: false, defaultValue: []) final List devices; - /// List of users muted by the user + /// List of users muted by the user. @JsonKey(includeIfNull: false, defaultValue: []) final List mutes; - /// List of users muted by the user + /// List of users muted by the user. @JsonKey(includeIfNull: false, defaultValue: []) final List channelMutes; - /// Total unread messages by the user + /// Total unread messages by the user. @JsonKey(includeIfNull: false, defaultValue: 0) final int totalUnreadCount; - /// Total unread channels by the user + /// Total unread channels by the user. @JsonKey(includeIfNull: false) final int? unreadChannels; /// Known top level fields. + /// /// Useful for [Serializer] methods. static final topLevelFields = [ 'devices',