SubscriptionInfo class final
A single subscription from the Mercure Subscriptions API.
Constructors
-
SubscriptionInfo({required String id, required String type, required String topic, required String subscriber, required bool active, Map<
String, dynamic> ? payload, String? lastEventId}) -
const
-
SubscriptionInfo.fromJson(Map<
String, dynamic> json) -
Parses a SubscriptionInfo from a JSON-LD map.
factory
- SubscriptionInfo.fromJsonString(String source)
-
Parses a SubscriptionInfo from a JSON string.
factory
Properties
- active → bool
-
Whether the subscription is currently active.
final
- hashCode → int
-
The hash code for this object.
no setteroverride
- id → String
-
The subscription IRI (URL path).
final
- lastEventId → String?
-
The last event ID for this specific subscription.
final
-
payload
→ Map<
String, dynamic> ? -
Optional payload associated with the subscription.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- subscriber → String
-
The subscriber identifier (typically a URN).
final
- topic → String
-
The topic this subscription is for.
final
- type → String
-
Always
"Subscription".final
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
override