Broadcast class

Represents a discrete state mutation event within the event-sourcing timeline.

A Broadcast encapsulates the data structure, cryptographic payload signatures, and logical sequence IDs necessary to deterministically replay history across decentralized channel nodes.

Constructors

Broadcast({required String uuid, required String event, required String channel, required int clientTimestamp, required String encodedPayload, String? clientSignature, required BroadcastStatus status, int? servertime, int? sequenceId, String? serverSignature, String? senderId})
Creates a new broadcast event container.

Properties

channel → String
The communication topic or channel name.
final
clientSignature → String?
Identity signature of the originating client.
final
clientTimestamp ↔ int
Local creation timestamp.
getter/setter pair
encodedPayload → String
The raw, encoded event data.
final
event → String
The specific action or event type identifier.
final
hashCode → int
The hash code for this object.
no setterinherited
payload ↔ Map<String, dynamic>?
Decoded local runtime property parameters read by active pipelines.
latefinal
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
senderId ↔ String?
userId of the sender
getter/setter pair
sequenceId ↔ int?
Global ordering index assigned by the server.
getter/setter pair
serverSignature ↔ String?
Server signature confirming ledger placement.
getter/setter pair
servertime ↔ int?
Official timestamp assigned by the server.
getter/setter pair
status ↔ BroadcastStatus
Current synchronization state with the network.
getter/setter pair
uuid → String
Unique transaction identifier.
final

Methods

acknowledge({required int servertime, required int sequenceId, required String serverSignature}) → void
Updates the broadcast with official server sequence data and marks it as confirmed.
addObserver(BroadcastObserver observer) → void
Registers an observer to be notified of changes to this broadcast's status.
fail() → void
Marks this broadcast as failed if transmission or validation fell through.
getPayload() → Map<String, dynamic>
Returns the cached unencrypted payload map.
hasUnencryptedPayload() → bool
Returns true if the plaintext payload has been decoded and cached.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
removeObserver(BroadcastObserver observer) → void
Removes a previously registered observer.
setPlaintextPayload(Map<String, dynamic> payload) → void
Caches the decrypted, unencrypted payload map for quick local access.
toMap() → Map<String, dynamic>
Converts the entire broadcast object into a map with encoded payload, suitable for transport and database storage.
toPush() → Map<String, dynamic>
Formats the critical event fields into a map suitable for push notifications.
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited

Static Methods

fromMap(Map<String, dynamic> map) → Broadcast
Reconstructs a Broadcast instance from a map, leaving its payload encoded.

Constants

columnChannel → const String
The channel or topic namespace this event belongs to.
columnClientSignature → const String
The signature proving the identity of the sending client.
columnClientTimestamp → const String
The local timestamp when the client created the event.
columnEncodedPayload → const String
The encrypted or encoded payload data string.
columnEvent → const String
The name of the event or action type (e.g., 'attack', 'move').
columnSenderId → const String
Unique client-generated ID for duplicate detection and tracking.
columnSequenceId → const String
The strict, incrementing sequence ID assigned by the server for ordering.
columnServerSignature → const String
The cryptographic signature from the server confirming the event sequence.
columnServertime → const String
The official server timestamp assigned when the event was received.
columnStatus → const String
The current confirmation status of the event.
columnUuid → const String
Unique client-generated ID for duplicate detection and tracking.
tableName → const String
The local database table name where events are stored.