MessageViewers.fromJson constructor

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

Parse from a json

Implementation

factory MessageViewers.fromJson(Map<String, dynamic> json) => MessageViewers(
      viewers: List<MessageViewer>.from((json['viewers'] ?? [])
          .map((item) => MessageViewer.fromJson(item))
          .toList()),
      extra: json['@extra'],
      clientId: json['@client_id'],
    );