SubscriptionHandle.fromJson constructor

SubscriptionHandle.fromJson(
  1. Map<String, dynamic> json
)

Create from JSON.

Implementation

factory SubscriptionHandle.fromJson(Map<String, dynamic> json) {
  return SubscriptionHandle(
    subscriptionId: json['subscriptionId'] as String,
    topic: json['topic'] as String,
    mode: TopicMode.values.byName(json['mode'] as String),
    createdAt: json['createdAt'] as int,
    expiresAt: json['expiresAt'] as int?,
  );
}