OwnUser class
The class that defines the own user model.
This object can be found in Event.
- Inheritance
- Available extensions
- Annotations
-
- @JsonSerializable.new(includeIfNull: false)
Constructors
-
OwnUser({List<
Device> devices = const [], List<Mute> mutes = const [], int totalUnreadCount = 0, int unreadChannels = 0, List<ChannelMute> channelMutes = const [], int unreadThreads = 0, List<String> blockedUserIds = const [], PushPreference? pushPreferences, PrivacySettings? privacySettings, required String id, String? role, String? name, String? image, DateTime? createdAt, DateTime? updatedAt, DateTime? lastActive, bool online = false, Map<String, Object?> extraData = const {}, bool banned = false, DateTime? banExpires, List<String> teams = const [], String? language, bool? invisible, Map<String, String> ? teamsRole, int? avgResponseTime}) - Constructor used for json serialization.
-
OwnUser.fromJson(Map<
String, dynamic> json) -
Create a new instance from json.
factory
- OwnUser.fromUser(User user)
-
Create a new instance from User object.
factory
Properties
- avgResponseTime → int?
-
The average response time of the user in seconds.
finalinherited
- banExpires → DateTime?
-
The date at which the ban will expire.
finalinherited
- banned → bool
-
True if user is banned from the chat.
finalinherited
-
blockedUserIds
→ List<
String> -
List of user ids that are blocked by the user.
final
-
channelMutes
→ List<
ChannelMute> -
List of channels muted by the user.
final
- createdAt → DateTime?
-
Date of user creation.
finalinherited
-
devices
→ List<
Device> -
List of user devices.
final
-
extraData
→ Map<
String, Object?> -
Map of custom user extraData.
finalinherited
- hashCode → int
-
The hash code for this object.
no setterinherited
- id → String
-
User id.
finalinherited
- image → String?
-
Shortcut for user image.
no setterinherited
- invisible → bool?
-
Whether the user is sharing their online presence.
finalinherited
- isDeliveryReceiptsEnabled → bool
-
Available on OwnUser, provided by the PrivacySettingsExtension extension
Whether delivery receipts are enabled for the user.no setter - isReadReceiptsEnabled → bool
-
Available on OwnUser, provided by the PrivacySettingsExtension extension
Whether read receipts are enabled for the user.no setter - isTypingIndicatorsEnabled → bool
-
Available on OwnUser, provided by the PrivacySettingsExtension extension
Whether typing indicators are enabled for the user.no setter - language → String?
-
The language this user prefers.
finalinherited
- lastActive → DateTime?
-
Date of last user connection.
finalinherited
-
mutes
→ List<
Mute> -
List of users muted by the user.
final
- name → String
-
Shortcut for user name.
no setterinherited
- online → bool
-
True if user is online.
finalinherited
- privacySettings → PrivacySettings?
-
Privacy settings for the user if set.
final
-
props
→ List<
Object?> -
The list of properties that will be used to determine whether
two instances are equal.
no setterinherited
- pushPreferences → PushPreference?
-
Push preferences for the user if set.
final
- role → String?
-
User role.
finalinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- stringify → bool?
-
If set to
true, thetoStringmethod will be overridden to output this instance'sprops.no setterinherited -
teams
→ List<
String> -
User teams
finalinherited
-
teamsRole
→ Map<
String, String> ? -
The roles for the user in the teams.
finalinherited
- totalUnreadCount → int
-
Total unread messages by the user.
final
- unreadChannels → int
-
Total unread channels by the user.
final
- unreadThreads → int
-
Total unread threads by the user.
final
- updatedAt → DateTime?
-
Date of last user update.
finalinherited
Methods
-
copyWith(
{String? id, String? role, String? name, String? image, DateTime? createdAt, DateTime? updatedAt, DateTime? lastActive, bool? online, Map< String, Object?> ? extraData, bool? banned, DateTime? banExpires, List<String> ? teams, List<ChannelMute> ? channelMutes, List<Device> ? devices, List<Mute> ? mutes, List<String> ? blockedUserIds, int? totalUnreadCount, int? unreadChannels, int? unreadThreads, String? language, bool? invisible, Map<String, String> ? teamsRole, int? avgResponseTime, PushPreference? pushPreferences, PrivacySettings? privacySettings}) → OwnUser -
Creates a copy of OwnUser with specified attributes overridden.
override
-
getComparableField(
String sortKey) → ComparableField? -
Gets a comparable field value for the given
sortKey.inherited -
merge(
OwnUser? other) → OwnUser -
Returns a new OwnUser that is a combination of this ownUser
and the given
otherownUser. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toJson(
) → Map< String, dynamic> -
Convert instance to json.
override
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Properties
-
topLevelFields
→ List<
String> -
Known top level fields.
final