EventFluxData class

Represents the data structure for an EventFlux event.

EventFluxData is used to store and represent the data associated with a specific event in the EventFlux system. It encapsulates details such as the event's ID, name, and the actual data payload.

Attributes:

  • id: A nullable string representing the unique identifier of the event. This is typically used to distinguish between different events.
  • event: A nullable string indicating the name or type of the event. This is used to categorize or identify the nature of the event.
  • data: A nullable string containing the actual payload or information associated with the event.

Constructors:

  • EventFluxData: The default constructor requires all three attributes (data, id, event) to be provided explicitly.
  • EventFluxData.fromData: A named constructor that creates an instance from a single string, expecting the string to be formatted with each attribute on a new line, prefixed with its name and a colon.

Example:

EventFluxData event = EventFluxData(id: '123', event: 'message', data: 'Hello, World!');
EventFluxData eventFromData = EventFluxData.fromData('id:123\nevent:message\ndata:Hello, World!');

This class provides a structured way to handle and pass around event data within the EventFlux system, ensuring consistency and ease of access to different parts of an event's information.

Constructors

EventFluxData({required String data, required String id, required String event})
Constructs an instance of EventFluxData with given id, event, and data.
EventFluxData.fromData(String data)

Properties

data String
Event Data
getter/setter pair
event String
Event Name
getter/setter pair
hashCode int
The hash code for this object.
no setterinherited
id String
Event ID
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

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