RealtimeMessage<A, Ob, T, Or> class

A realtime message for changes to one or many feeds.

Each time a new activity is added or removed, an update will be received directly.

Note that new activities coming from subscription will only contain enrichment for these fields:

  • Activity SA
  • Reaction SR
  • Object SO
  • User SU

The only thing you don’t get is the enriched reactions like own_reaction or latest_reactions

Annotations
  • @JsonSerializable(genericArgumentFactories: true)
  • @DateTimeUTCConverter()

Constructors

RealtimeMessage({required FeedId? feed, List<String> deleted = const <String>[], List<ForeignIdTimePair> deletedForeignIds = const <ForeignIdTimePair>[], List<GenericEnrichedActivity<A, Ob, T, Or>>? newActivities, String? appId, DateTime? publishedAt})
Builds a RealtimeMessage.
const
RealtimeMessage.fromJson(Map<String, dynamic> json, [A fromJsonA(Object? json)?, Ob fromJsonOb(Object? json)?, T fromJsonT(Object? json)?, Or fromJsonOr(Object? json)?])
Create a new instance from a JSON object
factory

Properties

appId String?
AppId to which this app is connected to
final
deleted List<String>
All activities deleted by this update
final
deletedForeignIds List<ForeignIdTimePair>
A pair of foreign_id and time of the deleted activities
final
feed FeedId?
Name of the feed this update was published on
final
hashCode int
The hash code for this object.
no setterinherited
newActivities List<GenericEnrichedActivity<A, Ob, T, Or>>?
All activities created by this update Do note that new activities coming from subscription will only contain enrichment for these fields:
final
props List<Object?>
The list of properties that will be used to determine whether two instances are equal.
no setter
publishedAt DateTime?
Time of the update in ISO format
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
stringify bool?
If set to true, the toString method will be overridden to output this instance's props.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson(Object? toJsonA(A value), Object? toJsonOb(Ob value), Object? toJsonT(T value), Object? toJsonOr(Or value)) Map<String, dynamic>
Serialize to json
toString() String
A string representation of this object.
inherited

Operators

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