NIMSession class Null safety
Recent sessions
- Annotations
-
- @JsonSerializable()
Constructors
-
NIMSession({required String sessionId, String? senderAccount, String? senderNickname, required NIMSessionType sessionType, String? lastMessageId, NIMMessageType? lastMessageType, NIMMessageStatus? lastMessageStatus, String? lastMessageContent, int? lastMessageTime, NIMMessageAttachment? lastMessageAttachment, int? unreadCount = 0, Map<
String, dynamic> ? extension, int? tag}) -
NIMSession.fromMap(Map<
String, dynamic> map) -
factory
Properties
-
extension
↔ Map<
String, dynamic> ? -
Extension field
@JsonKey(fromJson: castPlatformMapToDartMap), read / write
- hashCode → int
-
The hash code for this object.
read-only, inherited
- lastMessageAttachment → NIMMessageAttachment?
-
If the most recent message belongs to the extended type, get the attachment of the message.
You can define custom brief text for messages in the recent message list.@JsonKey(fromJson: NIMMessageAttachment._fromMap, toJson: NIMMessageAttachment._toMap), final - lastMessageContent → String?
-
Get the brief content of the most recent message
Return text for text messages.
Return a brief description of messages of other typesfinal - lastMessageId → String?
-
Get the ID of the most recent message NIMMessage.uuid
final
- lastMessageStatus → NIMMessageStatus?
-
Get the status of the most recent message
final
- lastMessageTime → int?
-
Get the time of the most recent message in milliseconds
final
- lastMessageType → NIMMessageType?
-
Get the type of the most recent message
final
- runtimeType → Type
-
A representation of the runtime type of the object.
read-only, inherited
- senderAccount → String?
-
Get the account of a sender that sent the most recent message
final
- senderNickname → String?
-
Get the nickname of an user that sent the most recent message.
final
- sessionId → String
-
Recent the contact ID
final
- sessionType → NIMSessionType
-
Get the session type
final
- tag ↔ int?
-
Set a tag used to pin a contact or sort recent sessions. SDK has no specific use of tags.
Third-party apps can handle the use of tags.read / write - unreadCount → int?
-
Get the unread count of messages sent from the contact
final
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a non-existent method or property is accessed.
inherited
-
toMap(
) → Map< String, dynamic> -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited