SubscriptionInfo.fromJson constructor

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

Construct from JSON.

Implementation

factory SubscriptionInfo.fromJson(Map<String, dynamic> json) {
  return SubscriptionInfo(
    plan: json['plan'] != null
        ? SubscriptionPlan.fromJson(json['plan'] as Map<String, dynamic>)
        : null,
    status: SubscriptionStatus.fromJson(json['status'] as String?),
    id: json['id'] as String?,
  );
}