Ephemeral class

Represents the ephemeral events of a room.

The events field contains a list of ephemeral events.

This class corresponds to the ephemeral object defined in the Matrix API specification. For more details, refer to the API documentation at https://matrix.org/docs/spec/client_server/latest#ephemeral-object.

To create an instance of Ephemeral, use the provided factory constructors or the fromJson method. It is also possible to create an initial instance of Ephemeral using the initial factory constructor.

Example usage:

final ephemeral = Ephemeral.fromJson(jsonData);
final events = ephemeral.events;
Annotations
  • @Freezed(makeCollectionsUnmodifiable: false)

Constructors

Ephemeral({@JsonKey(name: 'events') List<Message?>? events})
Creates an Ephemeral instance.
factory
Ephemeral.fromJson(Map<String, dynamic> json)
Creates an Ephemeral instance from a JSON map.
factory
Ephemeral.initial()
Creates an initial Ephemeral instance.
factory

Properties

copyWith → $EphemeralCopyWith<Ephemeral>
no setterinherited
events List<Message?>?
no setterinherited
hashCode int
The hash code for this object.
no setterinherited
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
toJson() Map<String, dynamic>
inherited
toString() String
A string representation of this object.
inherited

Operators

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