NotificationGroup.fromJson constructor

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

Parses a NotificationGroup from TDLib JSON.

Implementation

factory NotificationGroup.fromJson(Map<String, dynamic> json) =>
    NotificationGroup(
      id: _readInt(json['id']),
      type: _readObject(json['type'], NotificationGroupType.fromJson),
      chatId: _readInt(json['chat_id']),
      totalCount: _readInt(json['total_count']),
      notifications: _readList<Notification>(json['notifications'],
          (e) => _readObject(e, Notification.fromJson)),
    );