SyncMessageEntry class
A message entry within a SyncPayload.
For media messages, only the metadata and thumbnail are included. The actual binary file is transferred separately via Nearby's FILE payload API (Phase 3).
Constructors
- SyncMessageEntry({required String messageId, required String senderId, required String targetId, required String payloadBase64, required int status, required int createdAt, required int ttl, String? signature, int mediaType = 0, String? mediaFileName, String? mediaMimeType, int? mediaFileSize, String? mediaHash, String? thumbnailBase64})
-
const
-
SyncMessageEntry.fromJson(Map<
String, dynamic> json) -
factory
Properties
- createdAt → int
-
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- isMedia → bool
-
Whether this message carries a media attachment.
no setter
- mediaFileName → String?
-
Original filename (e.g., 'photo_001.jpg'). Null for text.
final
- mediaFileSize → int?
-
Size of the full media file in bytes. Null for text.
final
- mediaHash → String?
-
SHA-256 hash of the full media file. Null for text.
final
- mediaMimeType → String?
-
MIME type (e.g., 'image/jpeg'). Null for text.
final
- mediaType → int
-
Media type (0 = text, 1 = image, 2 = video, etc.).
final
- messageId → String
-
final
- payloadBase64 → String
-
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- senderId → String
-
final
- signature → String?
-
final
- status → int
-
final
- targetId → String
-
final
- thumbnailBase64 → String?
-
Base64-encoded thumbnail bytes (≤5 KB). Null for text or
media types that don't support thumbnails.
final
- ttl → int
-
final
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toJson(
) → Map< String, dynamic> -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited