NotificationGroup.fromJson constructor

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

Parse from a json

Implementation

factory NotificationGroup.fromJson(Map<String, dynamic> json) =>
    NotificationGroup(
      id: json['id'],
      type: NotificationGroupType.fromJson(json['type']),
      chatId: json['chat_id'],
      totalCount: json['total_count'],
      notifications: List<Notification>.from((json['notifications'] ?? [])
          .map((item) => Notification.fromJson(item))
          .toList()),
    );