Subscriptions.fromJson constructor

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

Implementation

factory Subscriptions.fromJson(Map<String, dynamic> json) {
  List<SubscribedChannel> subscribedChannels = [];
  json['channels'].forEach((channel) =>
      subscribedChannels.add(SubscribedChannel.fromJson(channel)));
  return Subscriptions(
    channels: subscribedChannels,
  );
}